ecs

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package ecs provides a client to retrieve Copilot ECS information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client retrieves Copilot information from ECS endpoint.

func New

func New(sess *session.Session) *Client

New inits a new Client.

func (Client) ClusterARN added in v1.1.0

func (c Client) ClusterARN(app, env string) (string, error)

ClusterARN returns the ARN of the cluster in an environment.

func (Client) DescribeService added in v1.1.0

func (c Client) DescribeService(app, env, svc string) (*ServiceDesc, error)

DescribeService returns the description of an ECS service given Copilot service info.

func (Client) ListActiveAppEnvTasks added in v1.1.0

func (c Client) ListActiveAppEnvTasks(opts ListActiveAppEnvTasksOpts) ([]*ecs.Task, error)

ListActiveAppEnvTasks returns the active Copilot tasks in the environment of an application.

func (Client) ListActiveDefaultClusterTasks added in v1.1.0

func (c Client) ListActiveDefaultClusterTasks(filter ListTasksFilter) ([]*ecs.Task, error)

ListActiveDefaultClusterTasks returns the active Copilot tasks in the default cluster.

func (Client) ListActiveWorkloadTasks added in v1.0.0

func (c Client) ListActiveWorkloadTasks(app, env, workload string) (clusterARN string, taskARNs []string, err error)

ListActiveWorkloadTasks lists all active workload tasks (with desired status to be RUNNING) in the environment.

func (Client) ServiceARN added in v1.1.0

func (c Client) ServiceARN(app, env, svc string) (*ecs.ServiceArn, error)

ServiceARN returns the ARN of an ECS service created with Copilot.

type ListActiveAppEnvTasksOpts added in v1.1.0

type ListActiveAppEnvTasksOpts struct {
	App string
	Env string
	ListTasksFilter
}

ListActiveAppEnvTasksOpts contains the parameters for ListActiveAppEnvTasks.

type ListTasksFilter added in v1.1.0

type ListTasksFilter struct {
	TaskGroup string
	TaskID    string
}

ListTasksFilter contains the filtering parameters for listing Copilot tasks.

type ServiceDesc added in v1.1.0

type ServiceDesc struct {
	Name        string
	ClusterName string
	Tasks       []*ecs.Task
}

ServiceDesc contains the description of an ECS service.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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