Skip to content

Commit

Permalink
Use dedicated type for Container State
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Renaud Gaubert <[email protected]>
  • Loading branch information
Renaud Gaubert and thaJeztah committed Jul 8, 2020
1 parent 89419f0 commit 66ad83f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions specs-go/state.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
package specs

// ContainerState represents the state of a container.
type ContainerState string

const (
// StateCreating indicates that the container is being created
StateCreating = "creating"
StateCreating ContainerState = "creating"

// StateCreated indicates that the runtime has finished the create operation
StateCreated = "created"
StateCreated ContainerState = "created"

// StateRunning indicates that the container process has executed the
// user-specified program but has not exited
StateRunning = "running"
StateRunning ContainerState = "running"

// StateStopped indicates that the container process has exited
StateStopped = "stopped"
StateStopped ContainerState = "stopped"
)

// State holds information about the runtime state of the container.
Expand Down

0 comments on commit 66ad83f

Please sign in to comment.