Create checkpointed image in client

Allow a user provided name for the checkpoint as well as a default
generated name for the checkpoint image.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-10-17 12:05:11 -04:00
parent a19fd6ed6e
commit e201be5196
8 changed files with 73 additions and 59 deletions

View File

@@ -28,6 +28,14 @@ func WithExit(r *CheckpointTaskInfo) error {
return nil
}
// WithCheckpointName sets the image name for the checkpoint
func WithCheckpointName(name string) CheckpointTaskOpts {
return func(r *CheckpointTaskInfo) error {
r.Name = name
return nil
}
}
// ProcessDeleteOpts allows the caller to set options for the deletion of a task
type ProcessDeleteOpts func(context.Context, Process) error