Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerLabels ¶
type ContainerLimits ¶
ContainerLimits represents the resource limits specified at the task level
type ContainerNetwork ¶
type ECSContainerMetadata ¶
type ECSContainerMetadata struct { DockerID string `json:"DockerId"` Name string `json:"Name"` DockerName string `json:"DockerName"` Image string `json:"Image"` ImageID string `json:"ImageID"` DesiredStatus string `json:"DesiredStatus"` KnownStatus string `json:"KnownStatus"` Limits ContainerLimits `json:"Limits"` CreatedAt time.Time `json:"CreatedAt"` StartedAt time.Time `json:"StartedAt"` Type string `json:"Type"` Networks []ContainerNetwork `json:"Networks"` ContainerLabels `json:"Labels"` }
ECSContainerV3Metadata represents the ECS container metadata as described in https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-metadata.html#metadata-file-format
type ECSMetadataProvider ¶
type ECSMetadataProvider struct { Endpoint string // contains filtered or unexported fields }
ECSMetadataProvider retireves ECS service metadata from the ECS_CONTAINER_METADATA_URI endpoint
func NewECSMetadataProvider ¶
func NewECSMetadataProvider(endpoint string, c *http.Client) *ECSMetadataProvider
NewECSMetadataProvider initializes a new ECSMetadataClient with given endpoint and HTTP client. If there is no HTTP client provided, the provider will use http.DefaultClient
func (*ECSMetadataProvider) ContainerMetadata ¶
func (c *ECSMetadataProvider) ContainerMetadata(ctx context.Context) (ECSContainerMetadata, error)
ContainerMetadata returns ECS metadata for current container
func (*ECSMetadataProvider) TaskMetadata ¶
func (c *ECSMetadataProvider) TaskMetadata(ctx context.Context) (ECSTaskMetadata, error)
TaskMetadata returns ECS metadata for current task
type ECSTaskMetadata ¶
type ECSTaskMetadata struct { TaskARN string `json:"TaskARN"` AvailabilityZone string `json:"AvailabilityZone,omitempty"` // only available starting from ECS platform v1.4 Family string `json:"Family"` Revision string `json:"Revision"` DesiredStatus string `json:"DesiredStatus"` KnownStatus string `json:"KnownStatus"` Containers []ECSContainerMetadata `json:"Containers"` PullStartedAt time.Time `json:"PullStartedAt"` PullStoppedAt time.Time `json:"PullStoppedAt"` }
ECSTaskMetadata represents the ECS task metadata as described in https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-metadata-endpoint-v3.html#task-metadata-endpoint-v3-response