containerd/supervisor/checkpoint.go
John Howard cdb5947f86 Supervisor compiles
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-02-26 14:58:15 -08:00

33 lines
678 B
Go

// +build !windows
package supervisor
import "github.com/docker/containerd/runtime"
type CreateCheckpointTask struct {
baseTask
ID string
Checkpoint *runtime.Checkpoint
}
func (s *Supervisor) createCheckpoint(t *CreateCheckpointTask) error {
i, ok := s.containers[t.ID]
if !ok {
return ErrContainerNotFound
}
return i.container.Checkpoint(*t.Checkpoint)
}
type DeleteCheckpointTask struct {
baseTask
ID string
Checkpoint *runtime.Checkpoint
}
func (s *Supervisor) deleteCheckpoint(t *DeleteCheckpointTask) error {
i, ok := s.containers[t.ID]
if !ok {
return ErrContainerNotFound
}
return i.container.DeleteCheckpoint(t.Checkpoint.Name)
}