task

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogGroupName    = "/aws/ecs/zim"
	LogStreamPrefix = "zim"
)

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html awslogs-stream-prefix prefix-name/container-name/ecs-task-id

Variables

This section is empty.

Functions

func RunAll

func RunAll(ctx context.Context, runner Runner, taskOptions []*Options, batchSize int) error

RunAll runs a task for each configuration and waits for all tasks to finish

Types

type FargateConfig

type FargateConfig struct {
	ContainerName  string
	Subnets        []string
	SecurityGroup  string
	Cluster        string
	TaskDefinition string
	AssignPublicIP bool
	Athens         string
}

FargateConfig defines a Fargate setup

type Options

type Options struct {
	Definition  string
	Environment map[string]string
	Memory      int64
	CPU         int64
}

Options configures a task to run

type Runner

type Runner interface {
	Run(context.Context, Options) (*Task, error)

	WaitUntilRunning(context.Context, ...*Task) error

	WaitUntilStopped(context.Context, ...*Task) error
}

Runner is an interface used to run tasks

func NewFargate

func NewFargate(sess *session.Session, cfg FargateConfig) Runner

NewFargate returns a task runner backended by ECS Fargate

type Task

type Task struct {
	ARN       string `json:"arn"`
	ID        string `json:"id"`
	LogGroup  string `json:"log_group"`
	LogStream string `json:"log_stream"`
}

Task that was run

type TaskDefinition

type TaskDefinition struct {
	ARN     arn.ARN
	Name    string
	Version string
}

TaskDefinition carries information about an ECS task definition

Jump to

Keyboard shortcuts

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