awsutil

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ECSMetadataURIEnvVar = "ECS_CONTAINER_METADATA_URI_V4"

Variables

This section is empty.

Functions

func NewSession added in v0.2.0

func NewSession(meta ECSTaskMeta, userAgentCaller string) (*session.Session, error)

NewSession prepares a client session. The returned session includes a User-Agent handler to enable AWS to track usage. If the AWS SDK fails to find the region, the region is parsed from Task metadata (on EC2 the region is not typically defined in the environment).

func UserAgentHandler added in v0.2.0

func UserAgentHandler(caller string) request.NamedHandler

Types

type ECSTaskMeta

type ECSTaskMeta struct {
	Cluster    string                 `json:"Cluster"`
	TaskARN    string                 `json:"TaskARN"`
	Family     string                 `json:"Family"`
	Containers []ECSTaskMetaContainer `json:"Containers"`
}

func ECSTaskMetadata

func ECSTaskMetadata() (ECSTaskMeta, error)

func (ECSTaskMeta) TaskID

func (e ECSTaskMeta) TaskID() string

type ECSTaskMetaContainer added in v0.2.0

type ECSTaskMetaContainer struct {
	Name          string            `json:"Name"`
	Health        ECSTaskMetaHealth `json:"Health"`
	DesiredStatus string            `json:"DesiredStatus"`
	KnownStatus   string            `json:"KnownStatus"`
}

type ECSTaskMetaHealth added in v0.2.0

type ECSTaskMetaHealth struct {
	Status      string `json:"status"`
	StatusSince string `json:"statusSince"`
	ExitCode    int    `json:"exitCode"`
}

Jump to

Keyboard shortcuts

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