status

package
v0.0.0-...-1133dd9 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 24

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
	// ContainerManifestPulled represents a container which has had its image manifest pulled
	ContainerManifestPulled
	// 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) BackendStatusString

func (cs ContainerStatus) BackendStatusString() string

BackendStatusString maps the internal container status in Agent to a backend recognized status string.

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) MarshalText

func (cs ContainerStatus) MarshalText() ([]byte, error)

Marshals a container status to its text form. In some cases such as a map with ContainerStatus as keys, MarshalText method is used to marshal container statuses by functions in the encoding package. Without this method container statuses will be marshaled as integers which is undesirable.

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

func (*ContainerStatus) UnmarshalText

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

Unmarshals a container status from its text form.

type ManagedAgentStatus

type ManagedAgentStatus int32

ManagedAgentStatus is an enumeration of valid states in the managed agent lifecycle

const (
	// ManagedAgentStatusNone is the zero state of a managed agent
	ManagedAgentStatusNone ManagedAgentStatus = iota
	// ManagedAgentCreated represents a managed agent which has dependencies in place
	ManagedAgentCreated
	// ManagedAgentRunning represents a managed agent that has started sucessfully
	ManagedAgentRunning
	// ManagedAgentStopped represents a managed agent that has stopped
	ManagedAgentStopped
)

func (ManagedAgentStatus) BackendStatus

func (mas ManagedAgentStatus) BackendStatus() string

BackendStatus maps the internal managedAgent status in the agent to that in the backend This exists to force the status to be one of PENDING|RUNNING}|STOPPED

func (ManagedAgentStatus) IsRunning

func (mas ManagedAgentStatus) IsRunning() bool

IsRunning returns true if the managed agent status is either RUNNING

func (*ManagedAgentStatus) MarshalJSON

func (mas *ManagedAgentStatus) MarshalJSON() ([]byte, error)

MarshalJSON overrides the logic for JSON-encoding the ManagedAgentStatus type

func (ManagedAgentStatus) ShouldReportToBackend

func (mas ManagedAgentStatus) ShouldReportToBackend() bool

ShouldReportToBackend returns true if the managedAgent status is recognized as a valid state by ECS. Note that not all managedAgent statuses are recognized by ECS or map to ECS states For now we expect PENDING/RUNNING/STOPPED as valid states we should only skip events that have ManagedAgentStatusNone

func (ManagedAgentStatus) String

func (mas ManagedAgentStatus) String() string

String returns a human readable string representation of this object

func (ManagedAgentStatus) Terminal

func (mas ManagedAgentStatus) Terminal() bool

Terminal returns true if the managed agent status is STOPPED

func (*ManagedAgentStatus) UnmarshalJSON

func (mas *ManagedAgentStatus) UnmarshalJSON(b []byte) error

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

Jump to

Keyboard shortcuts

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