Documentation ¶
Overview ¶
Package ecsutil is a layer on top of Amazon ECS to provide an app aware ECS client.
Index ¶
- Variables
- type Client
- func (c *Client) CreateAppService(ctx context.Context, app string, input *ecs.CreateServiceInput) (*ecs.CreateServiceOutput, error)
- func (c *Client) DeleteAppService(ctx context.Context, app string, input *ecs.DeleteServiceInput) (*ecs.DeleteServiceOutput, error)
- func (c *Client) ListAppServices(ctx context.Context, appID string, input *ecs.ListServicesInput) (*ecs.ListServicesOutput, error)
- func (c *Client) ListAppTasks(ctx context.Context, appID string, input *ecs.ListTasksInput) (*ecs.ListTasksOutput, error)
- func (c *Client) RegisterAppTaskDefinition(ctx context.Context, app string, input *ecs.RegisterTaskDefinitionInput) (*ecs.RegisterTaskDefinitionOutput, error)
- func (c *Client) UpdateAppService(ctx context.Context, app string, input *ecs.UpdateServiceInput) (*ecs.UpdateServiceOutput, error)
- type ECS
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultDelimiter is the default delimiter used to separate the app name from // the service type. DefaultDelimiter = "--" )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // client used to interact with the ecs API. ECS // The delimiter to use to separate app name from service type. Zero // value is the DefaultDelimiter. Delimiter string }
Client is an app aware ECS client.
func NewClient ¶
func NewClient(p client.ConfigProvider) *Client
NewClient returns a new Client instance using the provided aws.Config.
func (*Client) CreateAppService ¶
func (c *Client) CreateAppService(ctx context.Context, app string, input *ecs.CreateServiceInput) (*ecs.CreateServiceOutput, error)
CreateAppService creates a new ecs service for the app.
func (*Client) DeleteAppService ¶
func (c *Client) DeleteAppService(ctx context.Context, app string, input *ecs.DeleteServiceInput) (*ecs.DeleteServiceOutput, error)
DeleteAppService deletes the service for the app.
func (*Client) ListAppServices ¶
func (c *Client) ListAppServices(ctx context.Context, appID string, input *ecs.ListServicesInput) (*ecs.ListServicesOutput, error)
ListAppServices lists all services for the app.
func (*Client) ListAppTasks ¶
func (c *Client) ListAppTasks(ctx context.Context, appID string, input *ecs.ListTasksInput) (*ecs.ListTasksOutput, error)
ListAppTasks lists all the tasks for the app.
func (*Client) RegisterAppTaskDefinition ¶
func (c *Client) RegisterAppTaskDefinition(ctx context.Context, app string, input *ecs.RegisterTaskDefinitionInput) (*ecs.RegisterTaskDefinitionOutput, error)
RegisterAppTaskDefinition register a task definition for the app.
func (*Client) UpdateAppService ¶
func (c *Client) UpdateAppService(ctx context.Context, app string, input *ecs.UpdateServiceInput) (*ecs.UpdateServiceOutput, error)
UpdateAppService updates the service for the app.
type ECS ¶
type ECS interface { // Task Definitions RegisterTaskDefinition(context.Context, *ecs.RegisterTaskDefinitionInput) (*ecs.RegisterTaskDefinitionOutput, error) DescribeTaskDefinition(context.Context, *ecs.DescribeTaskDefinitionInput) (*ecs.DescribeTaskDefinitionOutput, error) // Services CreateService(context.Context, *ecs.CreateServiceInput) (*ecs.CreateServiceOutput, error) DeleteService(context.Context, *ecs.DeleteServiceInput) (*ecs.DeleteServiceOutput, error) UpdateService(context.Context, *ecs.UpdateServiceInput) (*ecs.UpdateServiceOutput, error) ListServicesPages(context.Context, *ecs.ListServicesInput, func(*ecs.ListServicesOutput, bool) bool) error DescribeServices(context.Context, *ecs.DescribeServicesInput) (*ecs.DescribeServicesOutput, error) // Tasks ListTasksPages(context.Context, *ecs.ListTasksInput, func(*ecs.ListTasksOutput, bool) bool) error StopTask(context.Context, *ecs.StopTaskInput) (*ecs.StopTaskOutput, error) DescribeTasks(context.Context, *ecs.DescribeTasksInput) (*ecs.DescribeTasksOutput, error) RunTask(context.Context, *ecs.RunTaskInput) (*ecs.RunTaskOutput, error) }
ECS represents our ECS client interface.
Click to show internal directories.
Click to hide internal directories.