Documentation ¶
Overview ¶
Package ecsclient provides a wrapper around the ECS and EC2 apis to provide useful helper functions for this program
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AugmentedContainer ¶
type AugmentedContainer interface { ContainerPorts(string) []uint16 ResolvePort(uint16) uint16 Running() bool ECSContainer() *ecs.Container }
AugmentedContainer is a container that has been augmented with additioanl convenience methods
type AugmentedTask ¶
type AugmentedTask interface { PublicIP() string PrivateIP() string Container(string) AugmentedContainer ECSTask() *ecs.Task EC2Instance() *ec2.Instance }
AugmentedTask is a task that has been augmented with additional convenience methods.
type ECSClient ¶
type ECSClient struct {
// contains filtered or unexported fields
}
ECSClient implements ECSSimpleClient. It is exposed for cross-package testing
type ECSSimpleClient ¶
type ECSSimpleClient interface {
Tasks(family, serviceName *string) ([]AugmentedTask, error)
}
ECSSimpleClient is an abstraction over the ECS API that does the following:
- Combines list+describe for you, handily dealing with any pagination and chunking.
- Describes the underlying EC2 instance and provides it via the EC2Instance field of the returned structs
func New ¶
func New(cluster string, region string, ecsclient ecsiface.ECSAPI, ec2client ec2iface.EC2API) ECSSimpleClient
New creates a new ECSSimpleClient. The 'ecsclient' and 'ec2client' arguments may both be nil in which case they will be constructed for you. If region is the empty string, it will be inferred from the environment or instance metadata service (in that order of preference). If a region cannot be found, this function will panic.