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 EventType `json:"type"`
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
ID string `json:"id,omitempty"`
|
||||
BundlePath string `json:"bundlePath,omitempty"`
|
||||
Stdio *runtime.Stdio `json:"stdio,omitempty"`
|
||||
Pid int `json:"pid,omitempty"`
|
||||
Status int `json:"status,omitempty"`
|
||||
Signal os.Signal `json:"signal,omitempty"`
|
||||
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:"-"`
|
||||
Type EventType
|
||||
Timestamp time.Time
|
||||
ID string
|
||||
BundlePath string
|
||||
Stdio *runtime.Stdio
|
||||
Pid int
|
||||
Status int
|
||||
Signal os.Signal
|
||||
Process *specs.Process
|
||||
State *runtime.State
|
||||
Containers []runtime.Container
|
||||
Checkpoint *runtime.Checkpoint
|
||||
Err chan error
|
||||
}
|
||||
|
||||
type Handler interface {
|
||||
|
|
|
@ -21,27 +21,27 @@ const (
|
|||
)
|
||||
|
||||
type State struct {
|
||||
Status Status `json:"status,omitempty"`
|
||||
Status Status
|
||||
}
|
||||
|
||||
type Stdio struct {
|
||||
Stderr string `json:"stderr,omitempty"`
|
||||
Stdout string `json:"stdout,omitempty"`
|
||||
Stderr string
|
||||
Stdout string
|
||||
}
|
||||
|
||||
type Checkpoint struct {
|
||||
// Timestamp is the time that checkpoint happened
|
||||
Timestamp time.Time `json:"timestamp,omitempty"`
|
||||
Timestamp time.Time
|
||||
// Name is the name of the checkpoint
|
||||
Name string `json:"name,omitempty"`
|
||||
Name string
|
||||
// Tcp checkpoints open tcp connections
|
||||
Tcp bool `json:"tcp"`
|
||||
Tcp bool
|
||||
// UnixSockets persists unix sockets in the checkpoint
|
||||
UnixSockets bool `json:"unixSockets"`
|
||||
UnixSockets bool
|
||||
// Shell persists tty sessions in the checkpoint
|
||||
Shell bool `json:"shell"`
|
||||
Shell bool
|
||||
// Exit exits the container after the checkpoint is finished
|
||||
Exit bool `json:"exit,omitempty"`
|
||||
Exit bool
|
||||
}
|
||||
|
||||
type Container interface {
|
||||
|
@ -67,12 +67,12 @@ type Container interface {
|
|||
Resume() error
|
||||
// Pause pauses a running container
|
||||
Pause() error
|
||||
|
||||
// Checkpoints returns all the checkpoints for a container
|
||||
Checkpoints() ([]Checkpoint, error)
|
||||
|
||||
// Checkpoint creates a new checkpoint
|
||||
Checkpoint(Checkpoint) error
|
||||
|
||||
// DeleteCheckpoint deletes the checkpoint for the provided name
|
||||
DeleteCheckpoint(name string) error
|
||||
|
||||
// Restore restores the container to that of the checkpoint provided by name
|
||||
Restore(name string) error
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue