Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerManager ¶
type ContainerManager interface { CreateContainer() (*cntr.Container, error) DestroyContainer(externalID string) error }
ContainerManager contains simple methods that need to be implemented for every container manager, specifically to create a container, and to destroy a specified container
type DummyContainerManager ¶
type DummyContainerManager struct{}
DummyContainerManager simply forwards all container requests to a standard IP address and port. This container needs to be already running; it does not create or destroy any containers as part of the lifecycle. It is primarily used for testing.
func (DummyContainerManager) CreateContainer ¶
func (cm DummyContainerManager) CreateContainer() (*cntr.Container, error)
CreateContainer simply returns the configuration of an (assumed) already-running container. It is required to satisfy the ContainerManager interface.
func (DummyContainerManager) DestroyContainer ¶
func (cm DummyContainerManager) DestroyContainer(externalID string) error
DestroyContainer does nothing! It is required to satisfy the ContainerManager interface.
type ECS ¶
ECS is the receiver struct for the container manager, specifically containing references to the logging components, settings etc needed
func (*ECS) CreateContainer ¶
CreateContainer simply creates an ECS containers as per the provided configuration settings
func (*ECS) DestroyContainer ¶
DestroyContainer simply destroys the ECS container identified by the provided ID
func (*ECS) InitialiseECSService ¶
InitialiseECSService creates a new AWS config object as per the provided configuration with regards to region and credentials
type Settings ¶
type Settings struct { Profile string Region string Cluster string TaskDefinition string LaunchType string AssignPublicIP string Subnets []string SecurityGroups []string MaximumContainerStartTimeSec int }
Settings represents the various configuration parameters for a ECS container manager and are typically read from an external configuration file