v3or4

package
v0.0.0-...-5cde5c4 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct{}

Client represents a client for a metadata v3 or v4 API endpoint.

type Container

type Container struct {
	Name          string            `json:"Name"`
	Limits        map[string]uint64 `json:"Limits,omitempty"`
	ImageID       string            `json:"ImageID,omitempty"`
	StartedAt     string            `json:"StartedAt,omitempty"` // 2017-11-17T17:14:07.781711848Z
	DockerName    string            `json:"DockerName"`
	Type          string            `json:"Type"`
	Image         string            `json:"Image"`
	Labels        map[string]string `json:"Labels,omitempty"`
	KnownStatus   string            `json:"KnownStatus"` // See https://github.com/aws/amazon-ecs-agent/blob/master/agent/api/container/status/containerstatus.go
	DesiredStatus string            `json:"DesiredStatus"`
	DockerID      string            `json:"DockerID"`
	CreatedAt     string            `json:"CreatedAt,omitempty"`
	Networks      []Network         `json:"Networks,omitempty"`
	Ports         []Port            `json:"Ports,omitempty"`
	LogDriver     string            `json:"LogDriver,omitempty"`    // present only in v4
	LogOptions    map[string]string `json:"LogOptions,omitempty"`   // present only in v4
	ContainerARN  string            `json:"ContainerARN,omitempty"` // present only in v4
	Health        *HealthStatus     `json:"Health,omitempty"`
	Volumes       []Volume          `json:"Volumes,omitempty"`
	ExitCode      *int64            `json:"ExitCode,omitempty"`
	Snapshotter   string            `json:"Snapshotter,omitempty"`
	RestartCount  *int              `json:"RestartCount,omitempty"` // present only in v4
}

Container represents a container within a task.

type HealthStatus

type HealthStatus struct {
	Status   string `json:"status,omitempty"`
	Since    string `json:"statusSince,omitempty"`
	ExitCode *int64 `json:"exitCode,omitempty"`
	Output   string `json:"output,omitempty"`
}

HealthStatus represents the health status of a container

type Network

type Network struct {
	NetworkMode   string   `json:"NetworkMode"`   // supports awsvpc and bridge
	IPv4Addresses []string `json:"IPv4Addresses"` // one-element list
	IPv6Addresses []string `json:"IPv6Addresses,omitempty"`
}

Network represents the network of a container

type Port

type Port struct {
	ContainerPort uint16 `json:"ContainerPort,omitempty"`
	Protocol      string `json:"Protocol,omitempty"`
	HostPort      uint16 `json:"HostPort,omitempty"`
	HostIP        string `json:"HostIP,omitempty"`
}

Port represents the ports of a container

type Task

type Task struct {
	ClusterName             string             `json:"Cluster"`
	Containers              []Container        `json:"Containers"`
	KnownStatus             string             `json:"KnownStatus"`
	TaskARN                 string             `json:"TaskARN"`
	Family                  string             `json:"Family"`
	Version                 string             `json:"Revision"`
	Limits                  map[string]float64 `json:"Limits,omitempty"`
	DesiredStatus           string             `json:"DesiredStatus"`
	LaunchType              string             `json:"LaunchType,omitempty"` // present only in v4
	ContainerInstanceTags   map[string]string  `json:"ContainerInstanceTags,omitempty"`
	TaskTags                map[string]string  `json:"TaskTags,omitempty"`
	EphemeralStorageMetrics map[string]int64   `json:"EphemeralStorageMetrics,omitempty"`
	ServiceName             string             `json:"ServiceName,omitempty"`
	VPCID                   string             `json:"VPCID,omitempty"`
	PullStartedAt           string             `json:"PullStartedAt,omitempty"`
	PullStoppedAt           string             `json:"PullStoppedAt,omitempty"`
	ExecutionStoppedAt      string             `json:"ExecutionStoppedAt,omitempty"`
	AvailabilityZone        string             `json:"AvailabilityZone,omitempty"`
}

Task represents a task as returned by the ECS metadata API v3 or v4.

type Volume

type Volume struct {
	DockerName  string `json:"DockerName,omitempty"`
	Source      string `json:"Source,omitempty"`
	Destination string `json:"Destination,omitempty"`
}

Volume represents the volumes of a container

Jump to

Keyboard shortcuts

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