Refactor checkpoint information

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2015-12-04 14:00:07 -08:00
parent e21364603e
commit 9eb08b8971
10 changed files with 85 additions and 44 deletions

View File

@@ -11,3 +11,15 @@ func (h *CreateCheckpointEvent) Handle(e *Event) error {
}
return container.Checkpoint(*e.Checkpoint)
}
type DeleteCheckpointEvent struct {
s *Supervisor
}
func (h *DeleteCheckpointEvent) Handle(e *Event) error {
container, ok := h.s.containers[e.ID]
if !ok {
return ErrContainerNotFound
}
return container.DeleteCheckpoint(e.Checkpoint.Name)
}