Implement options for runtime specific settings

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-06-23 14:55:10 -07:00
parent eedcbc64cc
commit 82d0208aaa
18 changed files with 1701 additions and 467 deletions

View File

@@ -248,15 +248,9 @@ func (t *task) Resize(ctx context.Context, w, h uint32) error {
return err
}
func WithExit(r *tasks.CheckpointTaskRequest) error {
r.Options["exit"] = "true"
return nil
}
func (t *task) Checkpoint(ctx context.Context, opts ...CheckpointOpts) (d v1.Descriptor, err error) {
request := &tasks.CheckpointTaskRequest{
ContainerID: t.containerID,
Options: make(map[string]string),
}
for _, o := range opts {
if err := o(request); err != nil {