ecs

package
v0.10.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Generated by go-decorator, DO NOT EDIT

Index

Constants

View Source
const MAX_DESCRIBE_SERVICE_IDS = 10

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	*ecs.Cluster
}

func NewCluster

func NewCluster(name string) *Cluster

type Container

type Container struct {
	*ecs.Container
}

type ContainerDefinition

type ContainerDefinition struct {
	*ecs.ContainerDefinition
}

func NewContainerDefinition

func NewContainerDefinition(name, imageName string, entryPoint []*string, command string, cpu, memory int64, essential bool, portMappings []*PortMapping) *ContainerDefinition

type ContainerInstance

type ContainerInstance struct {
	*ecs.ContainerInstance
}

func NewContainerInstance

func NewContainerInstance(agentConnected bool, cpuRegistered, memoryRegistered int, portsRegistered, udpPortsRegistered []*string) *ContainerInstance

func NewDefaultContainerInstance

func NewDefaultContainerInstance() *ContainerInstance

type ContainerOverride

type ContainerOverride struct {
	*ecs.ContainerOverride
}

func NewContainerOverride

func NewContainerOverride(name string, envVars map[string]string) *ContainerOverride

type ECS

type ECS struct {
	Connect func() (ECSInternal, error)
	// contains filtered or unexported fields
}

func (*ECS) CreateCluster

func (this *ECS) CreateCluster(clusterName string) (*Cluster, error)

func (*ECS) CreateService

func (this *ECS) CreateService(cluster, serviceName, taskDefinition string, desiredCount int64, loadBalancers []*LoadBalancer, loadBalancerRole *string) (*Service, error)

func (*ECS) DeleteCluster

func (this *ECS) DeleteCluster(clusterName string) error

func (*ECS) DeleteService

func (this *ECS) DeleteService(cluster, service string) error

func (*ECS) DeleteTaskDefinition

func (this *ECS) DeleteTaskDefinition(taskName string) error

func (*ECS) DescribeCluster

func (this *ECS) DescribeCluster(cluster string) (*Cluster, error)

func (*ECS) DescribeClusters

func (this *ECS) DescribeClusters(cluster []string) ([]*Cluster, error)

func (*ECS) DescribeContainerInstances

func (this *ECS) DescribeContainerInstances(clusterName string, instances []*string) ([]*ContainerInstance, error)

func (*ECS) DescribeService

func (this *ECS) DescribeService(cluster, service string) (*Service, error)

func (*ECS) DescribeServices

func (this *ECS) DescribeServices(cluster string, serviceIDs []*string) ([]*Service, error)

func (*ECS) DescribeTaskDefinition

func (this *ECS) DescribeTaskDefinition(familyAndRevision string) (*TaskDefinition, error)

func (*ECS) DescribeTasks

func (this *ECS) DescribeTasks(clusterName string, tasks []*string) ([]*Task, error)

func (*ECS) Helper_DescribeClusters

func (this *ECS) Helper_DescribeClusters() ([]*Cluster, error)

func (*ECS) Helper_DescribeServices

func (this *ECS) Helper_DescribeServices(prefix string) ([]*Service, error)

func (*ECS) Helper_DescribeTaskDefinitions

func (this *ECS) Helper_DescribeTaskDefinitions(prefix string) ([]*TaskDefinition, error)

func (*ECS) Helper_ListServices

func (this *ECS) Helper_ListServices(prefix string) ([]*string, error)

func (*ECS) Helper_ListTaskDefinitions

func (this *ECS) Helper_ListTaskDefinitions(prefix string) ([]*string, error)

func (*ECS) ListClusters

func (this *ECS) ListClusters() ([]*string, error)

func (*ECS) ListContainerInstances

func (this *ECS) ListContainerInstances(clusterName string) ([]*string, error)

func (*ECS) ListServices

func (this *ECS) ListServices(clusterName string) ([]*string, error)

func (*ECS) ListTaskDefinitionFamilies

func (this *ECS) ListTaskDefinitionFamilies(prefix string, nextToken *string) ([]*string, *string, error)

func (*ECS) ListTaskDefinitionFamiliesPages

func (this *ECS) ListTaskDefinitionFamiliesPages(prefix string) ([]*string, error)

func (*ECS) ListTaskDefinitions

func (this *ECS) ListTaskDefinitions(familyName string, nextToken *string) ([]*string, *string, error)

func (*ECS) ListTaskDefinitionsPages

func (this *ECS) ListTaskDefinitionsPages(familyName string) ([]*string, error)

func (*ECS) ListTasks

func (this *ECS) ListTasks(clusterName string, serviceName, desiredStatus, startedBy, containerInstanceID *string) ([]*string, error)

func (*ECS) RegisterTaskDefinition

func (this *ECS) RegisterTaskDefinition(family string, roleARN string, networkMode string, containerDefinitions []*ContainerDefinition, volumes []*Volume, placementConstraints []*PlacementConstraint) (*TaskDefinition, error)

func (*ECS) RunTask

func (this *ECS) RunTask(cluster, taskDefinition string, count int64, startedBy *string, overrides []*ContainerOverride) ([]*Task, []*FailedTask, error)

func (*ECS) StartTask

func (this *ECS) StartTask(cluster, taskDefinition string, overrides *TaskOverride, containerInstanceIDs []*string, startedBy *string) (err error)

func (*ECS) StopTask

func (this *ECS) StopTask(cluster, reason, task string) (err error)

func (*ECS) UpdateService

func (this *ECS) UpdateService(cluster, service string, taskDefinition *string, desiredCount *int64) error

type ECSInternal

type ECSInternal interface {
	CreateCluster(input *ecs.CreateClusterInput) (*ecs.CreateClusterOutput, error)
	CreateService(input *ecs.CreateServiceInput) (output *ecs.CreateServiceOutput, err error)
	DeleteCluster(input *ecs.DeleteClusterInput) (*ecs.DeleteClusterOutput, error)
	DeleteService(input *ecs.DeleteServiceInput) (*ecs.DeleteServiceOutput, error)
	DeregisterTaskDefinition(input *ecs.DeregisterTaskDefinitionInput) (*ecs.DeregisterTaskDefinitionOutput, error)
	DescribeClusters(input *ecs.DescribeClustersInput) (*ecs.DescribeClustersOutput, error)
	DescribeContainerInstances(input *ecs.DescribeContainerInstancesInput) (*ecs.DescribeContainerInstancesOutput, error)
	DescribeServices(input *ecs.DescribeServicesInput) (*ecs.DescribeServicesOutput, error)
	DescribeTaskDefinition(input *ecs.DescribeTaskDefinitionInput) (*ecs.DescribeTaskDefinitionOutput, error)

	DescribeTasks(input *ecs.DescribeTasksInput) (*ecs.DescribeTasksOutput, error)

	ListTasksPages(input *ecs.ListTasksInput, fn func(*ecs.ListTasksOutput, bool) bool) error
	ListClustersPages(input *ecs.ListClustersInput, fn func(*ecs.ListClustersOutput, bool) bool) error
	ListContainerInstancesPages(input *ecs.ListContainerInstancesInput, fn func(*ecs.ListContainerInstancesOutput, bool) bool) error
	ListServicesPages(input *ecs.ListServicesInput, fn func(*ecs.ListServicesOutput, bool) bool) error

	ListTaskDefinitions(input *ecs.ListTaskDefinitionsInput) (*ecs.ListTaskDefinitionsOutput, error)
	ListTaskDefinitionsPages(input *ecs.ListTaskDefinitionsInput, fn func(p *ecs.ListTaskDefinitionsOutput, lastPage bool) (shouldContinue bool)) error

	ListTaskDefinitionFamilies(input *ecs.ListTaskDefinitionFamiliesInput) (*ecs.ListTaskDefinitionFamiliesOutput, error)
	ListTaskDefinitionFamiliesPages(input *ecs.ListTaskDefinitionFamiliesInput, fn func(p *ecs.ListTaskDefinitionFamiliesOutput, lastPage bool) (shouldContinue bool)) error

	RegisterTaskDefinition(input *ecs.RegisterTaskDefinitionInput) (output *ecs.RegisterTaskDefinitionOutput, err error)
	RunTask(input *ecs.RunTaskInput) (output *ecs.RunTaskOutput, err error)
	StartTask(input *ecs.StartTaskInput) (output *ecs.StartTaskOutput, err error)
	StopTask(input *ecs.StopTaskInput) (output *ecs.StopTaskOutput, err error)
	UpdateService(input *ecs.UpdateServiceInput) (output *ecs.UpdateServiceOutput, err error)
}

func Connect

func Connect(credProvider provider.CredProvider, region string) (ECSInternal, error)

type FailedTask

type FailedTask struct {
	*ecs.Failure
}

type LoadBalancer

type LoadBalancer struct {
	*ecs.LoadBalancer
}

func NewLoadBalancer

func NewLoadBalancer(containerName string, containerPort int64, loadBalancerName string) *LoadBalancer

type PlacementConstraint

type PlacementConstraint struct {
	*ecs.TaskDefinitionPlacementConstraint
}

type PortMapping

type PortMapping struct {
	*ecs.PortMapping
}

func NewPortMapping

func NewPortMapping(containerPort int64, hostPort *int64, protocol string) *PortMapping

type Provider

type Provider interface {
	CreateCluster(clusterName string) (*Cluster, error)
	CreateService(cluster, serviceName, taskDefinition string, desiredCount int64, loadBalancers []*LoadBalancer, loadBalancerRole *string) (*Service, error)

	DeleteCluster(cluster string) error
	DeleteService(cluster, service string) error
	DeleteTaskDefinition(familyAndRevision string) error

	DescribeContainerInstances(clusterName string, instances []*string) ([]*ContainerInstance, error)
	DescribeCluster(clusterName string) (*Cluster, error)

	Helper_DescribeClusters() ([]*Cluster, error)
	DescribeService(cluster, service string) (*Service, error)

	DescribeServices(cluster string, service []*string) ([]*Service, error)
	Helper_DescribeServices(prefix string) ([]*Service, error)

	DescribeTaskDefinition(familyAndRevision string) (*TaskDefinition, error)
	Helper_DescribeTaskDefinitions(prefix string) ([]*TaskDefinition, error)

	DescribeTasks(cluster string, taskArns []*string) ([]*Task, error)

	ListClusters() ([]*string, error)
	ListContainerInstances(clusterName string) ([]*string, error)
	ListServices(clusterName string) ([]*string, error)
	Helper_ListServices(prefix string) ([]*string, error)
	ListTasks(clusterName string, serviceName, desiredStatus, startedBy, containerInstance *string) ([]*string, error)

	ListTaskDefinitions(familyName string, nextToken *string) ([]*string, *string, error)
	Helper_ListTaskDefinitions(prefix string) ([]*string, error)
	ListTaskDefinitionsPages(familyName string) ([]*string, error)

	ListTaskDefinitionFamilies(prefix string, nextToken *string) ([]*string, *string, error)
	ListTaskDefinitionFamiliesPages(prefix string) ([]*string, error)

	RegisterTaskDefinition(family string, roleARN string, networkMode string, containerDefinitions []*ContainerDefinition, volumes []*Volume, placementConstraints []*PlacementConstraint) (*TaskDefinition, error)
	RunTask(cluster, taskDefinition string, count int64, startedBy *string, overrides []*ContainerOverride) ([]*Task, []*FailedTask, error)
	StartTask(cluster, taskDefinition string, overrides *TaskOverride, containerInstanceIDs []*string, startedBy *string) error
	StopTask(cluster, reason, task string) error

	UpdateService(cluster, service string, taskDefinition *string, desiredCount *int64) error
}

func NewECS

func NewECS(credProvider provider.CredProvider, region string) (Provider, error)

type ProviderDecorator

type ProviderDecorator struct {
	Inner     Provider
	Decorator func(name string, call func() error) error
}

func (*ProviderDecorator) CreateCluster

func (this *ProviderDecorator) CreateCluster(p0 string) (v0 *Cluster, err error)

func (*ProviderDecorator) CreateService

func (this *ProviderDecorator) CreateService(p0 string, p1 string, p2 string, p3 int64, p4 []*LoadBalancer, p5 *string) (v0 *Service, err error)

func (*ProviderDecorator) DeleteCluster

func (this *ProviderDecorator) DeleteCluster(p0 string) (err error)

func (*ProviderDecorator) DeleteService

func (this *ProviderDecorator) DeleteService(p0 string, p1 string) (err error)

func (*ProviderDecorator) DeleteTaskDefinition

func (this *ProviderDecorator) DeleteTaskDefinition(p0 string) (err error)

func (*ProviderDecorator) DescribeCluster

func (this *ProviderDecorator) DescribeCluster(p0 string) (v0 *Cluster, err error)

func (*ProviderDecorator) DescribeContainerInstances

func (this *ProviderDecorator) DescribeContainerInstances(p0 string, p1 []*string) (v0 []*ContainerInstance, err error)

func (*ProviderDecorator) DescribeService

func (this *ProviderDecorator) DescribeService(p0 string, p1 string) (v0 *Service, err error)

func (*ProviderDecorator) DescribeServices

func (this *ProviderDecorator) DescribeServices(p0 string, p1 []*string) (v0 []*Service, err error)

func (*ProviderDecorator) DescribeTaskDefinition

func (this *ProviderDecorator) DescribeTaskDefinition(p0 string) (v0 *TaskDefinition, err error)

func (*ProviderDecorator) DescribeTasks

func (this *ProviderDecorator) DescribeTasks(p0 string, p1 []*string) (v0 []*Task, err error)

func (*ProviderDecorator) Helper_DescribeClusters

func (this *ProviderDecorator) Helper_DescribeClusters() (v0 []*Cluster, err error)

func (*ProviderDecorator) Helper_DescribeServices

func (this *ProviderDecorator) Helper_DescribeServices(p0 string) (v0 []*Service, err error)

func (*ProviderDecorator) Helper_DescribeTaskDefinitions

func (this *ProviderDecorator) Helper_DescribeTaskDefinitions(p0 string) (v0 []*TaskDefinition, err error)

func (*ProviderDecorator) Helper_ListServices

func (this *ProviderDecorator) Helper_ListServices(p0 string) (v0 []*string, err error)

func (*ProviderDecorator) Helper_ListTaskDefinitions

func (this *ProviderDecorator) Helper_ListTaskDefinitions(p0 string) (v0 []*string, err error)

func (*ProviderDecorator) ListClusters

func (this *ProviderDecorator) ListClusters() (v0 []*string, err error)

func (*ProviderDecorator) ListContainerInstances

func (this *ProviderDecorator) ListContainerInstances(p0 string) (v0 []*string, err error)

func (*ProviderDecorator) ListServices

func (this *ProviderDecorator) ListServices(p0 string) (v0 []*string, err error)

func (*ProviderDecorator) ListTaskDefinitionFamilies

func (this *ProviderDecorator) ListTaskDefinitionFamilies(p0 string, p1 *string) (v0 []*string, v1 *string, err error)

func (*ProviderDecorator) ListTaskDefinitionFamiliesPages

func (this *ProviderDecorator) ListTaskDefinitionFamiliesPages(p0 string) (v0 []*string, err error)

func (*ProviderDecorator) ListTaskDefinitions

func (this *ProviderDecorator) ListTaskDefinitions(p0 string, p1 *string) (v0 []*string, v1 *string, err error)

func (*ProviderDecorator) ListTaskDefinitionsPages

func (this *ProviderDecorator) ListTaskDefinitionsPages(p0 string) (v0 []*string, err error)

func (*ProviderDecorator) ListTasks

func (this *ProviderDecorator) ListTasks(p0 string, p1 *string, p2 *string, p3 *string, p4 *string) (v0 []*string, err error)

func (*ProviderDecorator) RegisterTaskDefinition

func (this *ProviderDecorator) RegisterTaskDefinition(p0 string, p1 string, p2 string, p3 []*ContainerDefinition, p4 []*Volume, p5 []*PlacementConstraint) (v0 *TaskDefinition, err error)

func (*ProviderDecorator) RunTask

func (this *ProviderDecorator) RunTask(p0 string, p1 string, p2 int64, p3 *string, p4 []*ContainerOverride) (v0 []*Task, v1 []*FailedTask, err error)

func (*ProviderDecorator) StartTask

func (this *ProviderDecorator) StartTask(p0 string, p1 string, p2 *TaskOverride, p3 []*string, p4 *string) (err error)

func (*ProviderDecorator) StopTask

func (this *ProviderDecorator) StopTask(p0 string, p1 string, p2 string) (err error)

func (*ProviderDecorator) UpdateService

func (this *ProviderDecorator) UpdateService(p0 string, p1 string, p2 *string, p3 *int64) (err error)

type Service

type Service struct {
	*ecs.Service
}

func NewService

func NewService(clusterARN, name string) *Service

type Task

type Task struct {
	*ecs.Task
}

func NewTask

func NewTask(clusterARN, taskID, deployARN string) *Task

func (*Task) GetContainers

func (t *Task) GetContainers() []*Container

type TaskDefinition

type TaskDefinition struct {
	*ecs.TaskDefinition
}

func NewTaskDefinition

func NewTaskDefinition() *TaskDefinition

func (*TaskDefinition) AddContainerDefinition

func (this *TaskDefinition) AddContainerDefinition(def *ContainerDefinition)

func (*TaskDefinition) GetContainerDefinitions

func (d *TaskDefinition) GetContainerDefinitions() []*ContainerDefinition

type TaskOverride

type TaskOverride struct {
	*ecs.TaskOverride
}

type Volume

type Volume struct {
	*ecs.Volume
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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