summaryrefslogtreecommitdiff
path: root/vendor/github.com/opencontainers/runtime-spec/specs-go/state.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-24 09:55:14 -0400
committerGitHub <noreply@github.com>2020-08-24 09:55:14 -0400
commit8fdc1169546421a239644159bbaf38db407f2b0f (patch)
treedb92a768992c49915faf58a12abe6d453305e267 /vendor/github.com/opencontainers/runtime-spec/specs-go/state.go
parent2c567dcbecbf41e9cff6ccd3ad91552b7e923c2a (diff)
parentd856210ea85269bdc23bb694f8828d89d2802f84 (diff)
downloadpodman-8fdc1169546421a239644159bbaf38db407f2b0f.tar.gz
podman-8fdc1169546421a239644159bbaf38db407f2b0f.tar.bz2
podman-8fdc1169546421a239644159bbaf38db407f2b0f.zip
Merge pull request #7372 from giuseppe/add-unified-configuration
podman: add option --cgroup-conf
Diffstat (limited to 'vendor/github.com/opencontainers/runtime-spec/specs-go/state.go')
-rw-r--r--vendor/github.com/opencontainers/runtime-spec/specs-go/state.go20
1 files changed, 19 insertions, 1 deletions
diff --git a/vendor/github.com/opencontainers/runtime-spec/specs-go/state.go b/vendor/github.com/opencontainers/runtime-spec/specs-go/state.go
index 89dce34be..e2e64c663 100644
--- a/vendor/github.com/opencontainers/runtime-spec/specs-go/state.go
+++ b/vendor/github.com/opencontainers/runtime-spec/specs-go/state.go
@@ -1,5 +1,23 @@
package specs
+// 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"
+)
+
// State holds information about the runtime state of the container.
type State struct {
// Version is the version of the specification that is supported.
@@ -7,7 +25,7 @@ type State struct {
// ID is the container ID
ID string `json:"id"`
// Status is the runtime status of the container.
- Status string `json:"status"`
+ Status ContainerState `json:"status"`
// Pid is the process ID for the container process.
Pid int `json:"pid,omitempty"`
// Bundle is the path to the container's bundle directory.