status

package
v1.44.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerHealthStatus

type ContainerHealthStatus int32

ContainerHealthStatus is an enumeration of container health check status

const (
	// ContainerHealthUnknown is the initial status of container health
	ContainerHealthUnknown ContainerHealthStatus = iota
	// ContainerHealthy represents the status of container health check when returned healthy
	ContainerHealthy
	// ContainerUnhealthy represents the status of container health check when returned unhealthy
	ContainerUnhealthy
)

func (ContainerHealthStatus) BackendStatus

func (healthStatus ContainerHealthStatus) BackendStatus() string

BackendStatus returns the container health status recognized by backend

func (*ContainerHealthStatus) MarshalJSON

func (healthStatus *ContainerHealthStatus) MarshalJSON() ([]byte, error)

MarshalJSON overrides the logic for JSON-encoding the ContainerHealthStatus type

func (ContainerHealthStatus) String

func (healthStatus ContainerHealthStatus) String() string

String returns the readable description of the container health status

func (*ContainerHealthStatus) UnmarshalJSON

func (healthStatus *ContainerHealthStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON overrides the logic for parsing the JSON-encoded container health data

type ContainerStatus

type ContainerStatus int32

ContainerStatus is an enumeration of valid states in the container lifecycle

const (
	// ContainerStatusNone is the zero state of a container; this container has not completed pull
	ContainerStatusNone ContainerStatus = iota
	// ContainerPulled represents a container which has had the image pulled
	ContainerPulled
	// ContainerCreated represents a container that has been created
	ContainerCreated
	// ContainerRunning represents a container that has started
	ContainerRunning
	// ContainerResourcesProvisioned represents a container that has completed provisioning all of its
	// resources. Non-internal containers (containers present in the task definition) transition to
	// this state without doing any additional work. However, containers that are added to a task
	// by the ECS Agent would possibly need to perform additional actions before they can be
	// considered "ready" and contribute to the progress of a task. For example, the "pause" container
	// would be provisioned by invoking CNI plugins
	ContainerResourcesProvisioned
	// ContainerStopped represents a container that has stopped
	ContainerStopped
	// ContainerZombie is an "impossible" state that is used as the maximum
	ContainerZombie
)

func (*ContainerStatus) BackendStatus

func (cs *ContainerStatus) BackendStatus(steadyStateStatus ContainerStatus) ContainerStatus

BackendStatus maps the internal container status in the agent to that in the backend

func (ContainerStatus) IsRunning

func (cs ContainerStatus) IsRunning() bool

IsRunning returns true if the container status is either RUNNING or RESOURCES_PROVISIONED

func (*ContainerStatus) MarshalJSON

func (cs *ContainerStatus) MarshalJSON() ([]byte, error)

MarshalJSON overrides the logic for JSON-encoding the ContainerStatus type

func (*ContainerStatus) ShouldReportToBackend

func (cs *ContainerStatus) ShouldReportToBackend(steadyStateStatus ContainerStatus) bool

ShouldReportToBackend returns true if the container status is recognized as a valid state by ECS. Note that not all container statuses are recognized by ECS or map to ECS states

func (ContainerStatus) String

func (cs ContainerStatus) String() string

String returns a human readable string representation of this object

func (ContainerStatus) Terminal

func (cs ContainerStatus) Terminal() bool

Terminal returns true if the container status is STOPPED

func (*ContainerStatus) UnmarshalJSON

func (cs *ContainerStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON overrides the logic for parsing the JSON-encoded ContainerStatus data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL