2015-12-18 00:07:04 +00:00
|
|
|
package supervisor
|
2015-12-04 00:07:53 +00:00
|
|
|
|
|
|
|
type CreateCheckpointEvent struct {
|
|
|
|
s *Supervisor
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *CreateCheckpointEvent) Handle(e *Event) error {
|
2016-01-06 21:32:46 +00:00
|
|
|
/*
|
|
|
|
i, ok := h.s.containers[e.ID]
|
|
|
|
if !ok {
|
|
|
|
return ErrContainerNotFound
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
return nil
|
|
|
|
// return i.container.Checkpoint(*e.Checkpoint)
|
2015-12-04 00:07:53 +00:00
|
|
|
}
|
2015-12-04 22:00:07 +00:00
|
|
|
|
|
|
|
type DeleteCheckpointEvent struct {
|
|
|
|
s *Supervisor
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *DeleteCheckpointEvent) Handle(e *Event) error {
|
2016-01-06 21:32:46 +00:00
|
|
|
/*
|
|
|
|
i, ok := h.s.containers[e.ID]
|
|
|
|
if !ok {
|
|
|
|
return ErrContainerNotFound
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
return nil
|
|
|
|
// return i.container.DeleteCheckpoint(e.Checkpoint.Name)
|
2015-12-04 22:00:07 +00:00
|
|
|
}
|