Skip to content

Commit 3e4195d

Browse files
authored
Merge pull request #1046 from RenaudWasTaken/state-const
Add State status constants to spec-go
2 parents 8e2f17c + 66ad83f commit 3e4195d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

specs-go/state.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
package specs
22

3+
// ContainerState represents the state of a container.
4+
type ContainerState string
5+
6+
const (
7+
// StateCreating indicates that the container is being created
8+
StateCreating ContainerState = "creating"
9+
10+
// StateCreated indicates that the runtime has finished the create operation
11+
StateCreated ContainerState = "created"
12+
13+
// StateRunning indicates that the container process has executed the
14+
// user-specified program but has not exited
15+
StateRunning ContainerState = "running"
16+
17+
// StateStopped indicates that the container process has exited
18+
StateStopped ContainerState = "stopped"
19+
)
20+
321
// State holds information about the runtime state of the container.
422
type State struct {
523
// Version is the version of the specification that is supported.

0 commit comments

Comments
 (0)