ecs

package
v0.32.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindArtifactVersions added in v0.27.0

func FindArtifactVersions(taskDefinition types.TaskDefinition) ([]*model.ArtifactVersion, error)

FindArtifactVersions parses artifact versions from ECS task definition.

func FindImageTag

func FindImageTag(taskDefinition types.TaskDefinition) (string, error)

FindImageTag parses image tag from given ECS task definition.

func LoadServiceDefinition

func LoadServiceDefinition(appDir, serviceDefinitionFilename string) (types.Service, error)

LoadServiceDefinition returns ServiceDefinition object from a given service definition file.

func LoadTargetGroups

func LoadTargetGroups(targetGroups config.ECSTargetGroups) (*types.LoadBalancer, *types.LoadBalancer, error)

LoadTargetGroups returns primary & canary target groups according to the defined in pipe definition file.

func LoadTaskDefinition

func LoadTaskDefinition(appDir, taskDefinition string) (types.TaskDefinition, error)

LoadTaskDefinition returns TaskDefinition object from a given task definition file.

Types

type Client

type Client interface {
	ECS
	ELB
}

Client is wrapper of ECS client.

type ECS

type ECS interface {
	ServiceExists(ctx context.Context, clusterName string, servicesName string) (bool, error)
	CreateService(ctx context.Context, service types.Service) (*types.Service, error)
	UpdateService(ctx context.Context, service types.Service) (*types.Service, error)
	RegisterTaskDefinition(ctx context.Context, taskDefinition types.TaskDefinition) (*types.TaskDefinition, error)
	GetPrimaryTaskSet(ctx context.Context, service types.Service) (*types.TaskSet, error)
	CreateTaskSet(ctx context.Context, service types.Service, taskDefinition types.TaskDefinition, targetGroup types.LoadBalancer, scale int) (*types.TaskSet, error)
	DeleteTaskSet(ctx context.Context, service types.Service, taskSetArn string) error
	UpdateServicePrimaryTaskSet(ctx context.Context, service types.Service, taskSet types.TaskSet) (*types.TaskSet, error)
}

type ELB

type ELB interface {
	GetListener(ctx context.Context, targetGroup types.LoadBalancer) (string, error)
	ModifyListener(ctx context.Context, listenerArn string, routingTrafficCfg RoutingTrafficConfig) error
}

type Registry

type Registry interface {
	Client(name string, cfg *config.CloudProviderECSConfig, logger *zap.Logger) (Client, error)
}

Registry holds a pool of aws client wrappers.

func DefaultRegistry

func DefaultRegistry() Registry

DefaultRegistry returns a pool of aws clients and a mutex associated with it.

type RoutingTrafficConfig

type RoutingTrafficConfig []targetGroupWeight

Jump to

Keyboard shortcuts

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