Documentation
¶
Index ¶
- func Get(ctx context.Context, client *http.Client) (interface{}, error)
- func GetContainer(ctx context.Context, client *http.Client) (interface{}, error)
- func GetTask(ctx context.Context, client *http.Client) (interface{}, error)
- func Has() bool
- type ContainerMetadataV3
- type ContainerMetadataV4
- type LabelsV4
- type Limits
- type TaskMetadataV3
- type TaskMetadataV4
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetContainer ¶
Will retrieve the container metadata for your current Fargate environment (either V3 or V4) based on the environment variables that are present
Types ¶
type ContainerMetadataV3 ¶
type ContainerMetadataV3 struct { DockerID string `json:"DockerId"` Name string `json:"Name"` DockerName string `json:"DockerName"` Image string `json:"Image"` ImageID string `json:"ImageID"` Labels struct { EcsCluster string `json:"com.amazonaws.ecs.cluster"` EcsContainerName string `json:"com.amazonaws.ecs.container-name"` EcsTaskArn string `json:"com.amazonaws.ecs.task-arn"` EcsTaskDefinitionFamily string `json:"com.amazonaws.ecs.task-definition-family"` EcsTaskDefinitionVersion string `json:"com.amazonaws.ecs.task-definition-version"` } `json:"Labels"` DesiredStatus string `json:"DesiredStatus"` KnownStatus string `json:"KnownStatus"` Limits struct { CPU int `json:"CPU"` Memory int `json:"Memory"` } `json:"Limits"` CreatedAt time.Time `json:"CreatedAt"` StartedAt time.Time `json:"StartedAt,omitempty"` Type string `json:"Type"` Networks []struct { NetworkMode string `json:"NetworkMode"` IPv4Addresses []string `json:"IPv4Addresses"` } `json:"Networks"` }
func GetContainerV3 ¶
Retrieve ECS Container Metadata in V3 format
type ContainerMetadataV4 ¶
type ContainerMetadataV4 struct { DockerID string `json:"DockerId"` Name string `json:"Name"` DockerName string `json:"DockerName"` Image string `json:"Image"` ImageID string `json:"ImageID"` Labels LabelsV4 `json:"Labels"` DesiredStatus string `json:"DesiredStatus"` KnownStatus string `json:"KnownStatus"` Limits Limits `json:"Limits"` CreatedAt time.Time `json:"CreatedAt"` StartedAt time.Time `json:"StartedAt"` Type string `json:"Type"` ContainerARN string `json:"ContainerARN"` LogDriver string `json:"LogDriver"` LogOptions struct { AwsLogsCreateGroup string `json:"awslogs-create-group"` AwsLogsGroup string `json:"awslogs-group"` AwsLogsStream string `json:"awslogs-stream"` AwsRegion string `json:"awslogs-region"` } `json:"LogOptions"` Networks []struct { NetworkMode string `json:"NetworkMode"` IPv4Addresses []string `json:"IPv4Addresses"` AttachmentIndex int `json:"AttachmentIndex"` IPv4SubnetCIDRBlock string `json:"IPv4SubnetCIDRBlock"` MACAddress string `json:"MACAddress"` DomainNameServers []string `json:"DomainNameServers"` DomainNameSearchList []string `json:"DomainNameSearchList"` PrivateDNSName string `json:"PrivateDNSName"` SubnetGatewayIpv4Address string `json:"SubnetGatewayIpv4Address"` } `json:"Networks"` }
func GetContainerV4 ¶
Retrieve ECS Container Metadata in V4 format
type LabelsV4 ¶
type LabelsV4 struct { EcsCluster string EcsContainerName string EcsTaskArn string EcsTaskDefinitionFamily string EcsTaskDefinitionVersion string // contains filtered or unexported fields }
func (*LabelsV4) UnmarshalJSON ¶
type TaskMetadataV3 ¶
type TaskMetadataV3 struct { Cluster string `json:"Cluster"` TaskARN string `json:"TaskARN"` Family string `json:"Family"` Revision string `json:"Revision"` DesiredStatus string `json:"DesiredStatus"` KnownStatus string `json:"KnownStatus"` Containers []ContainerMetadataV3 `json:"Containers"` Limits struct { CPU float64 `json:"CPU"` Memory int `json:"Memory"` } `json:"Limits"` PullStartedAt time.Time `json:"PullStartedAt"` PullStoppedAt time.Time `json:"PullStoppedAt"` }
type TaskMetadataV4 ¶
type TaskMetadataV4 struct { Cluster string `json:"Cluster"` TaskARN string `json:"TaskARN"` Family string `json:"Family"` Revision string `json:"Revision"` DesiredStatus string `json:"DesiredStatus"` KnownStatus string `json:"KnownStatus"` Limits Limits `json:"Limits"` PullStartedAt time.Time `json:"PullStartedAt"` PullStoppedAt time.Time `json:"PullStoppedAt"` AvailabilityZone string `json:"AvailabilityZone"` LaunchType string `json:"LaunchType"` Containers []ContainerMetadataV4 `json:"Containers"` }
Click to show internal directories.
Click to hide internal directories.