Documentation
¶
Overview ¶
Package aws provides abstractions that will be used for managing Amazon AWS resources
Index ¶
- Variables
- type ConnectionSettings
- type Fargate
- type MockFargate
- func (_m *MockFargate) GetContainerIP(ctx context.Context, taskARN string, cluster string, enablePublicIP bool, ...) (string, error)
- func (_m *MockFargate) Init() error
- func (_m *MockFargate) RunTask(ctx context.Context, taskSettings TaskSettings, connection ConnectionSettings) (string, error)
- func (_m *MockFargate) StopTask(ctx context.Context, taskARN string, cluster string, stopReason string) error
- func (_m *MockFargate) WaitUntilTaskHealthy(ctx context.Context, taskARN string, cluster string, ...) error
- func (_m *MockFargate) WaitUntilTaskRunning(ctx context.Context, taskARN string, cluster string, ...) error
- type TaskSettings
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ConnectionSettings ¶
type ConnectionSettings struct {
Subnets []*string
SecurityGroups []*string
EnablePublicIP bool
UsePublicIP bool
}
ConnectionSettings centralizes attributes related to the task's network configuration
type Fargate ¶
type Fargate interface {
// RunTask starts a new task in a pre configured Fargate
RunTask(ctx context.Context, taskSettings TaskSettings, connection ConnectionSettings) (string, error)
// WaitUntilTaskRunning blocks the request until the task is in "running"
// state or failed to reach this state
WaitUntilTaskRunning(ctx context.Context, taskARN string, cluster string, taskWaitConfig config.TaskWaitConfig) error
// WaitUntilTaskHealthy blocks until the task is in "healthy" state if a
// healthcheck is defined. It returns an error if the task failed to reach
// a healthy state in the allotted time.
WaitUntilTaskHealthy(ctx context.Context, taskARN string, cluster string, taskHealthWaitConfig config.TaskHealthWaitConfig) error
// RunTask stops a specified Fargate task
StopTask(ctx context.Context, taskARN, cluster, stopReason string) error
// GetContainerIP returns the IP of the container related to the specified task
GetContainerIP(ctx context.Context, taskARN string, cluster string, enablePublicIP bool, usePublicIP bool) (string, error)
// Init initialize variables and executes necessary procedures
Init() error
}
Fargate should be used to manage AWS Fargate Tasks (start, stop, etc)
type MockFargate ¶
MockFargate is an autogenerated mock type for the Fargate type
func NewMockFargate ¶ added in v0.3.0
func NewMockFargate(t interface {
mock.TestingT
Cleanup(func())
}) *MockFargate
NewMockFargate creates a new instance of MockFargate. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockFargate) GetContainerIP ¶
func (_m *MockFargate) GetContainerIP(ctx context.Context, taskARN string, cluster string, enablePublicIP bool, usePublicIP bool) (string, error)
GetContainerIP provides a mock function with given fields: ctx, taskARN, cluster, enablePublicIP, usePublicIP
func (*MockFargate) Init ¶
func (_m *MockFargate) Init() error
Init provides a mock function with no fields
func (*MockFargate) RunTask ¶
func (_m *MockFargate) RunTask(ctx context.Context, taskSettings TaskSettings, connection ConnectionSettings) (string, error)
RunTask provides a mock function with given fields: ctx, taskSettings, connection
func (*MockFargate) StopTask ¶
func (_m *MockFargate) StopTask(ctx context.Context, taskARN string, cluster string, stopReason string) error
StopTask provides a mock function with given fields: ctx, taskARN, cluster, stopReason
func (*MockFargate) WaitUntilTaskHealthy ¶ added in v0.4.0
func (_m *MockFargate) WaitUntilTaskHealthy(ctx context.Context, taskARN string, cluster string, taskHealthWaitConfig config.TaskHealthWaitConfig) error
WaitUntilTaskHealthy provides a mock function with given fields: ctx, taskARN, cluster, taskHealthWaitConfig
func (*MockFargate) WaitUntilTaskRunning ¶
func (_m *MockFargate) WaitUntilTaskRunning(ctx context.Context, taskARN string, cluster string, taskWaitConfig config.TaskWaitConfig) error
WaitUntilTaskRunning provides a mock function with given fields: ctx, taskARN, cluster, taskWaitConfig
type TaskSettings ¶ added in v0.2.0
type TaskSettings struct {
Cluster string
TaskDefinition string
PlatformVersion string
EnvironmentVariables map[string]string
// Indicates whether to propagate the tags from the task definition to the running task
PropagateTags bool
// Indidcates whether ECS Exec is enabled
EnableExecuteCommand bool
}
TaskSettings centralizes attributes related to the task configuration