Add basic checkpoint and restore support

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2015-12-03 16:07:53 -08:00
parent c1eb9ac90b
commit ae9b2bafd5
9 changed files with 231 additions and 29 deletions

View file

@ -11,14 +11,15 @@ import (
type EventType string
const (
ExecExitEventType EventType = "execExit"
ExitEventType EventType = "exit"
StartContainerEventType EventType = "startContainer"
DeleteEventType EventType = "deleteContainerEvent"
GetContainerEventType EventType = "getContainer"
SignalEventType EventType = "signal"
AddProcessEventType EventType = "addProcess"
UpdateContainerEventType EventType = "updateContainer"
ExecExitEventType EventType = "execExit"
ExitEventType EventType = "exit"
StartContainerEventType EventType = "startContainer"
DeleteEventType EventType = "deleteContainerEvent"
GetContainerEventType EventType = "getContainer"
SignalEventType EventType = "signal"
AddProcessEventType EventType = "addProcess"
UpdateContainerEventType EventType = "updateContainer"
CreateCheckpointEventType EventType = "createCheckpoint"
)
func NewEvent(t EventType) *Event {
@ -41,6 +42,7 @@ type Event struct {
Process *specs.Process `json:"process,omitempty"`
State *runtime.State `json:"state,omitempty"`
Containers []runtime.Container `json:"-"`
Checkpoint *runtime.Checkpoint `json:"checkpoint,omitempty"`
Err chan error `json:"-"`
}