Documentation ¶
Overview ¶
Package task provides support for running Amazon ECS tasks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultClusterGetter ¶
DefaultClusterGetter gets the default cluster.
type EnvRunner ¶
type EnvRunner struct { // Count of the tasks to be launched. Count int // Group Name of the tasks that use the same task definition. GroupName string // App and Env in which the tasks will be launched. App string Env string // Interfaces to interact with dependencies. Must not be nil. VPCGetter VPCGetter ClusterGetter ResourceGetter Starter Runner }
EnvRunner can run an Amazon ECS task in the VPC and the cluster of an environment.
type NetworkConfigRunner ¶
type NetworkConfigRunner struct { // Count of the tasks to be launched. Count int // Group Name of the tasks that use the same task definition. GroupName string // Network configuration Subnets []string SecurityGroups []string // Interfaces to interact with dependencies. Must not be nil. ClusterGetter DefaultClusterGetter Starter Runner // Must not be nil if using default subnets. VPCGetter VPCGetter }
NetworkConfigRunner runs an Amazon ECS task in the subnets, security groups, and the default cluster.
func (*NetworkConfigRunner) Run ¶
func (r *NetworkConfigRunner) Run() ([]*Task, error)
Run runs tasks in the subnets and the security groups, and returns the tasks. If subnets are not provided, it uses the default subnets.
type ResourceGetter ¶
type ResourceGetter interface {
GetResourcesByTags(resourceType string, tags map[string]string) ([]*resourcegroups.Resource, error)
}
ResourceGetter gets resources by tags.
type Runner ¶ added in v0.4.0
type Runner interface {
RunTask(input ecs.RunTaskInput) ([]*ecs.Task, error)
}
Runner runs the tasks and wait for it to start.
Click to show internal directories.
Click to hide internal directories.