2019-01-12 04:58:27 +00:00
|
|
|
package specs
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
// ContainerState represents the state of a container.
|
|
|
|
type ContainerState string
|
|
|
|
|
|
|
|
const (
|
|
|
|
// StateCreating indicates that the container is being created
|
|
|
|
StateCreating ContainerState = "creating"
|
|
|
|
|
|
|
|
// StateCreated indicates that the runtime has finished the create operation
|
|
|
|
StateCreated ContainerState = "created"
|
|
|
|
|
|
|
|
// StateRunning indicates that the container process has executed the
|
|
|
|
// user-specified program but has not exited
|
|
|
|
StateRunning ContainerState = "running"
|
|
|
|
|
|
|
|
// StateStopped indicates that the container process has exited
|
|
|
|
StateStopped ContainerState = "stopped"
|
|
|
|
)
|
|
|
|
|
2019-01-12 04:58:27 +00:00
|
|
|
// State holds information about the runtime state of the container.
|
|
|
|
type State struct {
|
|
|
|
// Version is the version of the specification that is supported.
|
|
|
|
Version string `json:"ociVersion"`
|
|
|
|
// ID is the container ID
|
|
|
|
ID string `json:"id"`
|
|
|
|
// Status is the runtime status of the container.
|
2020-08-10 17:43:49 +00:00
|
|
|
Status ContainerState `json:"status"`
|
2019-01-12 04:58:27 +00:00
|
|
|
// Pid is the process ID for the container process.
|
|
|
|
Pid int `json:"pid,omitempty"`
|
|
|
|
// Bundle is the path to the container's bundle directory.
|
|
|
|
Bundle string `json:"bundle"`
|
|
|
|
// Annotations are key values associated with the container.
|
|
|
|
Annotations map[string]string `json:"annotations,omitempty"`
|
|
|
|
}
|