mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
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:
committed by
Victor Marmol
parent
173642ab0b
commit
dbb515f01f
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user