ecs

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: Apache-2.0 Imports: 9 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateServiceInput

type CreateServiceInput struct {
	Cluster               string
	DesiredCount          int64
	Name                  string
	Port                  int64
	SecurityGroupIds      []string
	SubnetIds             []string
	TargetGroupArn        string
	TaskDefinitionArn     string
	AssignPublicIpEnabled bool
}

type CreateTaskDefinitionInput

type CreateTaskDefinitionInput struct {
	Cpu              string
	EnvVars          []EnvVar
	ExecutionRoleArn string
	Image            string
	Memory           string
	Name             string
	Port             int64
	LogGroupName     string
	LogRegion        string
	TaskRole         string
	Type             string
	TaskCommand      []string
}

func (*CreateTaskDefinitionInput) Environment

func (input *CreateTaskDefinitionInput) Environment() []*awsecs.KeyValuePair

type Deployment

type Deployment struct {
	CreatedAt    time.Time
	DesiredCount int64
	Id           string
	Image        string
	PendingCount int64
	RunningCount int64
	Status       string
}

type ECS

type ECS struct {
	ClusterName string
	// contains filtered or unexported fields
}

func New

func New(sess *session.Session, clusterName string) ECS

func (*ECS) AddEnvVarsToTaskDefinition

func (ecs *ECS) AddEnvVarsToTaskDefinition(taskDefinitionArn string, envVars []EnvVar) string

func (*ECS) CreateCluster

func (ecs *ECS) CreateCluster() (string, error)

func (*ECS) CreateService

func (ecs *ECS) CreateService(input *CreateServiceInput)

func (*ECS) CreateTaskDefinition

func (ecs *ECS) CreateTaskDefinition(input *CreateTaskDefinitionInput) string

func (*ECS) DescribeService

func (ecs *ECS) DescribeService(serviceName string) Service

func (*ECS) DescribeServices

func (ecs *ECS) DescribeServices(serviceArns []string) []Service

func (*ECS) DescribeTaskDefinition

func (ecs *ECS) DescribeTaskDefinition(taskDefinitionArn string) *awsecs.TaskDefinition

func (*ECS) DescribeTasks

func (ecs *ECS) DescribeTasks(taskIds []string) []Task

func (*ECS) DescribeTasksForService

func (ecs *ECS) DescribeTasksForService(serviceName string) []Task

func (*ECS) DescribeTasksForTaskGroup

func (ecs *ECS) DescribeTasksForTaskGroup(taskGroupName string) []Task

func (*ECS) DestroyService

func (ecs *ECS) DestroyService(serviceName string)

func (*ECS) GetCpuAndMemoryFromTaskDefinition

func (ecs *ECS) GetCpuAndMemoryFromTaskDefinition(taskDefinitionArn string) (string, string)

func (*ECS) GetDesiredCount

func (ecs *ECS) GetDesiredCount(serviceName string) int64

func (*ECS) GetEnvVarsFromTaskDefinition

func (ecs *ECS) GetEnvVarsFromTaskDefinition(taskDefinitionArn string) []EnvVar

func (*ECS) ListServices

func (ecs *ECS) ListServices() []Service

func (*ECS) ListTaskGroups

func (ecs *ECS) ListTaskGroups() []*TaskGroup

func (*ECS) RemoveEnvVarsFromTaskDefinition

func (ecs *ECS) RemoveEnvVarsFromTaskDefinition(taskDefinitionArn string, keys []string) string

func (*ECS) RestartService added in v0.2.3

func (ecs *ECS) RestartService(serviceName string)

func (*ECS) RunTask

func (ecs *ECS) RunTask(i *RunTaskInput)

func (*ECS) SetDesiredCount

func (ecs *ECS) SetDesiredCount(serviceName string, desiredCount int64)

func (*ECS) StopTask

func (ecs *ECS) StopTask(taskId string)

func (*ECS) StopTasks

func (ecs *ECS) StopTasks(taskIds []string)

func (*ECS) UpdateServiceTaskDefinition

func (ecs *ECS) UpdateServiceTaskDefinition(serviceName, taskDefinitionArn string)

func (*ECS) UpdateTaskDefinitionCpuAndMemory

func (ecs *ECS) UpdateTaskDefinitionCpuAndMemory(taskDefinitionArn, cpu, memory string) string

func (*ECS) UpdateTaskDefinitionImage

func (ecs *ECS) UpdateTaskDefinitionImage(taskDefinitionArn, image string) string

type EnvVar

type EnvVar struct {
	Key   string
	Value string
}

type Event

type Event struct {
	CreatedAt time.Time
	Message   string
}

type RunTaskInput

type RunTaskInput struct {
	ClusterName       string
	Count             int64
	SecurityGroupIds  []string
	SubnetIds         []string
	TaskDefinitionArn string
	TaskName          string
}

type Service

type Service struct {
	Cluster           string
	Cpu               string
	Deployments       []Deployment
	DesiredCount      int64
	EnvVars           []EnvVar
	Events            []Event
	Image             string
	Memory            string
	Name              string
	PendingCount      int64
	RunningCount      int64
	SecurityGroupIds  []string
	TargetGroupArn    string
	TaskDefinitionArn string
	TaskRole          string
	SubnetIds         []string
	Status            string
}

func (*Service) AddDeployment

func (s *Service) AddDeployment(d Deployment)

func (*Service) AddEvent

func (s *Service) AddEvent(e Event)

type Task

type Task struct {
	Cpu              string
	CreatedAt        time.Time
	DeploymentId     string
	DesiredStatus    string
	EniId            string
	EnvVars          []EnvVar
	Image            string
	LastStatus       string
	Memory           string
	SecurityGroupIds []string
	StartedBy        string
	SubnetId         string
	TaskId           string
	TaskRole         string
}

func (*Task) RunningFor

func (t *Task) RunningFor() time.Duration

type TaskGroup

type TaskGroup struct {
	TaskGroupName string
	Instances     int64
}

Jump to

Keyboard shortcuts

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