ecs

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ECSClient *ecs.Client = nil

ECSClient is client instance to call AWS ECS APIs

Functions

func DescribeCapacityProvider added in v0.9.0

func DescribeCapacityProvider(client ECSCapacityProviderClinet, names []string) ([]ecsTypes.CapacityProvider, error)

func DescribeCluster

func DescribeCluster(client ECSClusterClient, names []string) ([]ecsTypes.Cluster, error)

DescribeCluster returns Cluster list. This requires specifying cluster name

func DescribeDefinition

func DescribeDefinition(client ECSTaskDefinitionClient, name string) (types.TaskDefinition, error)

func DescribeInstance added in v0.2.0

func DescribeInstance(client ECSInstanceClient, cluster string, names []string) ([]types.ContainerInstance, error)

func DescribeService

func DescribeService(client ECSServiceClient, cluster string, names []string) ([]ecsTypes.Service, error)

DescribeService returns Service list. This requires specifying service name

func DescribeTask

func DescribeTask(client ECSTaskClient, cluster string, names []string) ([]ecsTypes.Task, error)

DescribeTask returns Task list. This requires specifying task name

func ExecuteCommand added in v0.6.0

func ExecuteCommand(client ECSTaskClient, cluster string, params *ExecuteCmmandParams) (*ecs.ExecuteCommandOutput, error)

func GetClient

func GetClient(region string, profile string) *ecs.Client

GetClient is singleton function returns ECSClient

func GetCluster

func GetCluster(client ECSClusterClient, names []string) ([]ecsTypes.Cluster, error)

GetCluster returns Cluster list. If names is not specified, calls listClusters API

func GetFamily added in v0.3.2

func GetFamily(client ECSTaskDefinitionClient, prefix string, status string) ([]string, error)

func GetInstance added in v0.2.0

func GetInstance(client ECSInstanceClient, cluster string, names []string) ([]types.ContainerInstance, error)

func GetRevision added in v0.3.2

func GetRevision(client ECSTaskDefinitionClient, family string, status string) ([]string, error)

func GetService

func GetService(client ECSServiceClient, cluster string, names []string) ([]ecsTypes.Service, error)

GetService returns Service list. If names is not specified, calls listServices API

func GetTask

func GetTask(client ECSTaskClient, cluster string, service string, names []string) ([]ecsTypes.Task, error)

GetTask returns Cluster list. If Service is not specified, returns tasks in the service

func GetTaskInCluster

func GetTaskInCluster(client ECSTaskClient, cluster string, names []string) ([]ecsTypes.Task, error)

GetTaskInCluster returns tasks in the Cluster

func GetTaskInService

func GetTaskInService(client ECSTaskClient, cluster string, service string, names []string) ([]ecsTypes.Task, error)

GetTaskInService returns tasks in the Service in the Cluster

func ListAllClusters added in v0.3.1

func ListAllClusters(ctx context.Context, paginator ListClustersPager) ([]string, error)

func ListAllFamilies added in v0.3.2

func ListAllFamilies(ctx context.Context, paginator ListTaskDefinitionFamiliesPager) ([]string, error)

func ListAllInstances added in v0.3.2

func ListAllInstances(ctx context.Context, paginator ListInstancesPager) ([]string, error)

func ListAllRevisions added in v0.3.2

func ListAllRevisions(ctx context.Context, paginator ListTaskDefinitionsPager) ([]string, error)

func ListAllServices added in v0.3.1

func ListAllServices(ctx context.Context, paginator ListServicesPager) ([]string, error)

func ListAllTasks added in v0.3.2

func ListAllTasks(ctx context.Context, paginators []ListTasksPager) ([]string, error)

Types

type ECSCapacityProviderClinet added in v0.9.0

type ECSCapacityProviderClinet interface {
	DescribeCapacityProviders(context.Context, *ecs.DescribeCapacityProvidersInput, ...func(*ecs.Options)) (*ecs.DescribeCapacityProvidersOutput, error)
}

type ECSClusterClient added in v0.3.1

type ECSClusterClient interface {
	DescribeClusters(context.Context, *ecs.DescribeClustersInput, ...func(*ecs.Options)) (*ecs.DescribeClustersOutput, error)
	ListClusters(context.Context, *ecs.ListClustersInput, ...func(*ecs.Options)) (*ecs.ListClustersOutput, error)
}

type ECSInstanceClient added in v0.3.2

type ECSInstanceClient interface {
	DescribeContainerInstances(context.Context, *ecs.DescribeContainerInstancesInput, ...func(*ecs.Options)) (*ecs.DescribeContainerInstancesOutput, error)
	ListContainerInstances(context.Context, *ecs.ListContainerInstancesInput, ...func(*ecs.Options)) (*ecs.ListContainerInstancesOutput, error)
}

type ECSServiceClient added in v0.3.1

type ECSServiceClient interface {
	DescribeServices(context.Context, *ecs.DescribeServicesInput, ...func(*ecs.Options)) (*ecs.DescribeServicesOutput, error)
	ListServices(context.Context, *ecs.ListServicesInput, ...func(*ecs.Options)) (*ecs.ListServicesOutput, error)
}

type ECSTaskClient added in v0.3.2

type ECSTaskClient interface {
	DescribeTasks(context.Context, *ecs.DescribeTasksInput, ...func(*ecs.Options)) (*ecs.DescribeTasksOutput, error)
	ExecuteCommand(context.Context, *ecs.ExecuteCommandInput, ...func(*ecs.Options)) (*ecs.ExecuteCommandOutput, error)
	ListTasks(context.Context, *ecs.ListTasksInput, ...func(*ecs.Options)) (*ecs.ListTasksOutput, error)
}

type ECSTaskDefinitionClient added in v0.3.2

type ECSTaskDefinitionClient interface {
	DescribeTaskDefinition(context.Context, *ecs.DescribeTaskDefinitionInput, ...func(*ecs.Options)) (*ecs.DescribeTaskDefinitionOutput, error)
	ListTaskDefinitionFamilies(context.Context, *ecs.ListTaskDefinitionFamiliesInput, ...func(*ecs.Options)) (*ecs.ListTaskDefinitionFamiliesOutput, error)
	ListTaskDefinitions(context.Context, *ecs.ListTaskDefinitionsInput, ...func(*ecs.Options)) (*ecs.ListTaskDefinitionsOutput, error)
}

type ExecuteCmmandParams added in v0.6.0

type ExecuteCmmandParams struct {
	Task        string
	Container   string
	Command     string
	Interactive bool
}

type ListClustersPager added in v0.3.1

type ListClustersPager interface {
	HasMorePages() bool
	NextPage(context.Context, ...func(*ecs.Options)) (*ecs.ListClustersOutput, error)
}

type ListInstancesPager added in v0.3.2

type ListInstancesPager interface {
	HasMorePages() bool
	NextPage(context.Context, ...func(*ecs.Options)) (*ecs.ListContainerInstancesOutput, error)
}

type ListServicesPager added in v0.3.1

type ListServicesPager interface {
	HasMorePages() bool
	NextPage(context.Context, ...func(*ecs.Options)) (*ecs.ListServicesOutput, error)
}

type ListTaskDefinitionFamiliesPager added in v0.3.2

type ListTaskDefinitionFamiliesPager interface {
	HasMorePages() bool
	NextPage(context.Context, ...func(*ecs.Options)) (*ecs.ListTaskDefinitionFamiliesOutput, error)
}

type ListTaskDefinitionsPager added in v0.3.2

type ListTaskDefinitionsPager interface {
	HasMorePages() bool
	NextPage(context.Context, ...func(*ecs.Options)) (*ecs.ListTaskDefinitionsOutput, error)
}

type ListTasksPager added in v0.3.2

type ListTasksPager interface {
	HasMorePages() bool
	NextPage(context.Context, ...func(*ecs.Options)) (*ecs.ListTasksOutput, error)
}

Jump to

Keyboard shortcuts

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