Implement checkpoint / restore for shim
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
835f3b6a97
commit
277cc920a4
8 changed files with 258 additions and 93 deletions
|
@ -5,14 +5,11 @@ type CreateCheckpointEvent struct {
|
|||
}
|
||||
|
||||
func (h *CreateCheckpointEvent) Handle(e *Event) error {
|
||||
/*
|
||||
i, ok := h.s.containers[e.ID]
|
||||
if !ok {
|
||||
return ErrContainerNotFound
|
||||
}
|
||||
*/
|
||||
return nil
|
||||
// return i.container.Checkpoint(*e.Checkpoint)
|
||||
i, ok := h.s.containers[e.ID]
|
||||
if !ok {
|
||||
return ErrContainerNotFound
|
||||
}
|
||||
return i.container.Checkpoint(*e.Checkpoint)
|
||||
}
|
||||
|
||||
type DeleteCheckpointEvent struct {
|
||||
|
@ -20,12 +17,9 @@ type DeleteCheckpointEvent struct {
|
|||
}
|
||||
|
||||
func (h *DeleteCheckpointEvent) Handle(e *Event) error {
|
||||
/*
|
||||
i, ok := h.s.containers[e.ID]
|
||||
if !ok {
|
||||
return ErrContainerNotFound
|
||||
}
|
||||
*/
|
||||
return nil
|
||||
// return i.container.DeleteCheckpoint(e.Checkpoint.Name)
|
||||
i, ok := h.s.containers[e.ID]
|
||||
if !ok {
|
||||
return ErrContainerNotFound
|
||||
}
|
||||
return i.container.DeleteCheckpoint(e.Checkpoint.Name)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue