ecs

package
v0.0.0-...-c593673 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const LastStatusPollInterval = time.Millisecond * time.Duration(500)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerOverride

type ContainerOverride struct {
	// Name of the container. Check your task definition on the AWS console
	// to find it out.
	Name *string `json:"name"`
	// Override how the container is executed. In Docker terms, it changes
	// the RUN specification.
	Command []*string `json:"command"`
}

type Fargate

type Fargate struct {
	HostVersion string
	// contains filtered or unexported fields
}

func NewFargate

func NewFargate(hostVersion string) *Fargate

func (*Fargate) Kill

func (f *Fargate) Kill(ctx context.Context, w spawner.World) error

func (*Fargate) Name

func (f *Fargate) Name() string

func (*Fargate) Ps

func (f *Fargate) Ps(ctx context.Context, g string) ([]*spawner.World, error)

func (*Fargate) Spawn

func (f *Fargate) Spawn(ctx context.Context, r io.Reader) (*spawner.World, error)

func (*Fargate) TaskAddr

func (f *Fargate) TaskAddr(ctx context.Context, t *ecs.Task) (*string, error)

type Task

type Task struct {
	Arn        *string `json:"arn"`
	ClusterArn *string `json:"cluster_arn"`
	Addr       *string `json:"addr"`
}

Task contains the information required to contact or stop a running task. Spawner callers have to store this information if the want to be able to Kill the World.

func TaskFrom

func TaskFrom(w *spawner.World) (Task, error)

func (*Task) NewWorld

func (t *Task) NewWorld(creator, galaxy string) (*spawner.World, error)

type TaskDefinition

type TaskDefinition struct {
	// The task definition name is the identification name, usually composed by
	// a user-defined task name and a revision number. Checkout the AWS console
	// to find it.
	Name *string `json:"name"`
	// Cluster specifies where the task is to be executed. The cluster must be
	// already present in the referred AWS ECS environment.
	Cluster        *string   `json:"cluster"`
	Subnets        []*string `json:"subnets"`
	SecurityGroups []*string `json:"security_groups"`
	// A task is composed by a variable number of containers. Here we can
	// override each one of them.
	// This is the place where we specify the HW requirements and, using the
	// "command override", how the tool is started.
	Overrides []*ContainerOverride
}

func TaskDefinitionFrom

func TaskDefinitionFrom(r io.Reader) (TaskDefinition, error)

Jump to

Keyboard shortcuts

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