2014-12-17 17:30:52 +08:00
|
|
|
package configs
|
2014-06-25 07:54:50 +08:00
|
|
|
|
2015-02-01 11:56:27 +08:00
|
|
|
// The status of a container.
|
|
|
|
type Status int
|
2014-07-09 01:17:05 +08:00
|
|
|
|
2015-02-01 11:56:27 +08:00
|
|
|
const (
|
2014-07-09 01:17:05 +08:00
|
|
|
// The container exists and is running.
|
2015-02-01 11:56:27 +08:00
|
|
|
Running Status = iota + 1
|
2014-07-09 01:17:05 +08:00
|
|
|
|
|
|
|
// 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
|
|
|
|
)
|
2015-02-07 13:12:27 +08:00
|
|
|
|
|
|
|
// State represents a running container's state
|
|
|
|
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"`
|
|
|
|
|
|
|
|
// Path to all the cgroups setup for a container. Key is cgroup subsystem name.
|
|
|
|
CgroupPaths map[string]string `json:"cgroup_paths,omitempty"`
|
|
|
|
}
|