Update api proposal

Move concepts into specific files for easy management
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: vmarmol)
This commit is contained in:
Michael Crosby
2014-07-08 10:17:05 -07:00
committed by Victor Marmol
parent 173642ab0b
commit dbb515f01f
7 changed files with 190 additions and 232 deletions
+21 -2
View File
@@ -12,14 +12,33 @@ import (
type State struct {
// InitPid is the init process id in the parent namespace
InitPid int `json:"init_pid,omitempty"`
// InitStartTime is the init process start time
InitStartTime string `json:"init_start_time,omitempty"`
// Network runtime state.
NetworkState network.NetworkState `json:"network_state,omitempty"`
}
// The name of the runtime state file
const stateFile = "state.json"
// The running state of the container.
type RunState int
const (
// The name of the runtime state file
stateFile = "state.json"
// The container exists and is running.
Running RunState = iota
// The container exists, it is in the process of being paused.
Pausing
// The container exists, but all its processes are paused.
Paused
// The container does not exist.
Destroyed
)
// SaveState writes the container's runtime state to a state.json file
// in the specified path