selector

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SelectCluster

func SelectCluster(ctx context.Context, client Client, selector Selector, clusterId string) (*types.Cluster, error)

func SelectContainer

func SelectContainer(containers []types.Container, containerId string) (*types.Container, error)

func SelectContainerDefinition

func SelectContainerDefinition(ctx context.Context, client *ecs.Client, taskDefinitionArn string, containerId string) (*types.ContainerDefinition, error)

func SelectService

func SelectService(ctx context.Context, client Client, selector Selector, clusterArn string, serviceId string) (*types.Service, error)

func SelectTask

func SelectTask(ctx context.Context, client Client, selector Selector, clusterArn string, serviceName string, taskId string) (*types.Task, error)

Types

type Client

type Client interface {
	DescribeClusters(ctx context.Context, input *ecs.DescribeClustersInput, options ...func(*ecs.Options)) (*ecs.DescribeClustersOutput, error)
	DescribeServices(ctx context.Context, input *ecs.DescribeServicesInput, options ...func(*ecs.Options)) (*ecs.DescribeServicesOutput, error)
	DescribeTasks(ctx context.Context, input *ecs.DescribeTasksInput, options ...func(*ecs.Options)) (*ecs.DescribeTasksOutput, error)
	ListClusters(ctx context.Context, input *ecs.ListClustersInput, options ...func(*ecs.Options)) (*ecs.ListClustersOutput, error)
	ListServices(ctx context.Context, input *ecs.ListServicesInput, options ...func(*ecs.Options)) (*ecs.ListServicesOutput, error)
	ListTasks(ctx context.Context, input *ecs.ListTasksInput, options ...func(*ecs.Options)) (*ecs.ListTasksOutput, error)
}

type DefaultSelector

type DefaultSelector struct{}

func (*DefaultSelector) Select

func (s *DefaultSelector) Select(title string, options []string) (string, error)

type Selector

type Selector interface {
	Select(title string, options []string) (string, error)
}

Jump to

Keyboard shortcuts

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