Documentation ¶
Overview ¶
Package ecs provides a client to retrieve Copilot ECS information.
Index ¶
- type Client
- func (c Client) ClusterARN(app, env string) (string, error)
- func (c Client) DescribeService(app, env, svc string) (*ServiceDesc, error)
- func (c Client) ListActiveAppEnvTasks(opts ListActiveAppEnvTasksOpts) ([]*ecs.Task, error)
- func (c Client) ListActiveDefaultClusterTasks(filter ListTasksFilter) ([]*ecs.Task, error)
- func (c Client) NetworkConfiguration(app, env, svc string) (*ecs.NetworkConfiguration, error)
- func (c Client) ServiceARN(app, env, svc string) (*ecs.ServiceArn, error)
- func (c Client) StopDefaultClusterTasks(familyName string) error
- func (c Client) StopOneOffTasks(app, env, family string) error
- func (c Client) StopWorkloadTasks(app, env, workload string) error
- func (c Client) TaskDefinition(app, env, svc string) (*ecs.TaskDefinition, error)
- type ListActiveAppEnvTasksOpts
- type ListTasksFilter
- type ServiceDesc
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 (Client) ClusterARN ¶ added in v1.1.0
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) NetworkConfiguration ¶ added in v1.6.0
func (c Client) NetworkConfiguration(app, env, svc string) (*ecs.NetworkConfiguration, error)
NetworkConfiguration returns the network configuration of the service.
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.
func (Client) StopDefaultClusterTasks ¶ added in v1.2.0
StopDefaultClusterTasks stops all copilot tasks from the given family in the default cluster.
func (Client) StopOneOffTasks ¶ added in v1.2.0
StopOneOffTasks stops all one-off tasks in the given application and environment with the family name.
func (Client) StopWorkloadTasks ¶ added in v1.2.0
StopWorkloadTasks stops all tasks in the given application, enviornment, and workload.
func (Client) TaskDefinition ¶ added in v1.6.0
func (c Client) TaskDefinition(app, env, svc string) (*ecs.TaskDefinition, error)
TaskDefinition returns the task definition of the service.
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 // Returns only tasks with the given TaskGroup name. TaskID string // Returns only tasks with the given ID. CopilotOnly bool // Returns only tasks with the `copilot-task` tag. }
ListTasksFilter contains the filtering parameters for listing Copilot tasks.