Remove serialization for internal types
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
a7e6e0a60e
commit
cb5aaec5d6
2 changed files with 26 additions and 26 deletions
26
event.go
26
event.go
|
@ -32,19 +32,19 @@ func NewEvent(t EventType) *Event {
|
||||||
}
|
}
|
||||||
|
|
||||||
type Event struct {
|
type Event struct {
|
||||||
Type EventType `json:"type"`
|
Type EventType
|
||||||
Timestamp time.Time `json:"timestamp"`
|
Timestamp time.Time
|
||||||
ID string `json:"id,omitempty"`
|
ID string
|
||||||
BundlePath string `json:"bundlePath,omitempty"`
|
BundlePath string
|
||||||
Stdio *runtime.Stdio `json:"stdio,omitempty"`
|
Stdio *runtime.Stdio
|
||||||
Pid int `json:"pid,omitempty"`
|
Pid int
|
||||||
Status int `json:"status,omitempty"`
|
Status int
|
||||||
Signal os.Signal `json:"signal,omitempty"`
|
Signal os.Signal
|
||||||
Process *specs.Process `json:"process,omitempty"`
|
Process *specs.Process
|
||||||
State *runtime.State `json:"state,omitempty"`
|
State *runtime.State
|
||||||
Containers []runtime.Container `json:"-"`
|
Containers []runtime.Container
|
||||||
Checkpoint *runtime.Checkpoint `json:"checkpoint,omitempty"`
|
Checkpoint *runtime.Checkpoint
|
||||||
Err chan error `json:"-"`
|
Err chan error
|
||||||
}
|
}
|
||||||
|
|
||||||
type Handler interface {
|
type Handler interface {
|
||||||
|
|
|
@ -21,27 +21,27 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
type State struct {
|
type State struct {
|
||||||
Status Status `json:"status,omitempty"`
|
Status Status
|
||||||
}
|
}
|
||||||
|
|
||||||
type Stdio struct {
|
type Stdio struct {
|
||||||
Stderr string `json:"stderr,omitempty"`
|
Stderr string
|
||||||
Stdout string `json:"stdout,omitempty"`
|
Stdout string
|
||||||
}
|
}
|
||||||
|
|
||||||
type Checkpoint struct {
|
type Checkpoint struct {
|
||||||
// Timestamp is the time that checkpoint happened
|
// Timestamp is the time that checkpoint happened
|
||||||
Timestamp time.Time `json:"timestamp,omitempty"`
|
Timestamp time.Time
|
||||||
// Name is the name of the checkpoint
|
// Name is the name of the checkpoint
|
||||||
Name string `json:"name,omitempty"`
|
Name string
|
||||||
// Tcp checkpoints open tcp connections
|
// Tcp checkpoints open tcp connections
|
||||||
Tcp bool `json:"tcp"`
|
Tcp bool
|
||||||
// UnixSockets persists unix sockets in the checkpoint
|
// UnixSockets persists unix sockets in the checkpoint
|
||||||
UnixSockets bool `json:"unixSockets"`
|
UnixSockets bool
|
||||||
// Shell persists tty sessions in the checkpoint
|
// Shell persists tty sessions in the checkpoint
|
||||||
Shell bool `json:"shell"`
|
Shell bool
|
||||||
// Exit exits the container after the checkpoint is finished
|
// Exit exits the container after the checkpoint is finished
|
||||||
Exit bool `json:"exit,omitempty"`
|
Exit bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type Container interface {
|
type Container interface {
|
||||||
|
@ -67,12 +67,12 @@ type Container interface {
|
||||||
Resume() error
|
Resume() error
|
||||||
// Pause pauses a running container
|
// Pause pauses a running container
|
||||||
Pause() error
|
Pause() error
|
||||||
|
// Checkpoints returns all the checkpoints for a container
|
||||||
Checkpoints() ([]Checkpoint, error)
|
Checkpoints() ([]Checkpoint, error)
|
||||||
|
// Checkpoint creates a new checkpoint
|
||||||
Checkpoint(Checkpoint) error
|
Checkpoint(Checkpoint) error
|
||||||
|
// DeleteCheckpoint deletes the checkpoint for the provided name
|
||||||
DeleteCheckpoint(name string) error
|
DeleteCheckpoint(name string) error
|
||||||
|
// Restore restores the container to that of the checkpoint provided by name
|
||||||
Restore(name string) error
|
Restore(name string) error
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue