ecs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPlugin

func NewPlugin(logger hclog.Logger) drivers.DriverPlugin

NewECSDriver returns a new DriverPlugin implementation

Types

type Driver

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

Driver is a driver for running ECS containers

func (*Driver) Capabilities

func (d *Driver) Capabilities() (*drivers.Capabilities, error)

func (*Driver) ConfigSchema

func (d *Driver) ConfigSchema() (*hclspec.Spec, error)

func (*Driver) DestroyTask

func (d *Driver) DestroyTask(taskID string, force bool) error

func (*Driver) ExecTask

func (d *Driver) ExecTask(_ string, _ []string, _ time.Duration) (*drivers.ExecTaskResult, error)

func (*Driver) Fingerprint

func (d *Driver) Fingerprint(ctx context.Context) (<-chan *drivers.Fingerprint, error)

func (*Driver) InspectTask

func (d *Driver) InspectTask(taskID string) (*drivers.TaskStatus, error)

func (*Driver) PluginInfo

func (d *Driver) PluginInfo() (*base.PluginInfoResponse, error)

func (*Driver) RecoverTask

func (d *Driver) RecoverTask(handle *drivers.TaskHandle) error

func (*Driver) SetConfig

func (d *Driver) SetConfig(cfg *base.Config) error

func (*Driver) Shutdown

func (d *Driver) Shutdown(ctx context.Context) error

func (*Driver) SignalTask

func (d *Driver) SignalTask(_ string, _ string) error

func (*Driver) StartTask

func (*Driver) StopTask

func (d *Driver) StopTask(taskID string, timeout time.Duration, signal string) error

func (*Driver) TaskConfigSchema

func (d *Driver) TaskConfigSchema() (*hclspec.Spec, error)

func (*Driver) TaskEvents

func (d *Driver) TaskEvents(ctx context.Context) (<-chan *drivers.TaskEvent, error)

func (*Driver) TaskStats

func (d *Driver) TaskStats(ctx context.Context, taskID string, interval time.Duration) (<-chan *structs.TaskResourceUsage, error)

func (*Driver) WaitTask

func (d *Driver) WaitTask(ctx context.Context, taskID string) (<-chan *drivers.ExitResult, error)

type DriverConfig

type DriverConfig struct {
	Enabled bool   `codec:"enabled"`
	Cluster string `codec:"cluster"`
	Region  string `codec:"region"`
}

DriverConfig is the driver configuration set by the SetConfig RPC call

type ECSTaskConfig

type ECSTaskConfig struct {
	LaunchType           string                   `codec:"launch_type"`
	TaskDefinition       string                   `codec:"task_definition"`
	NetworkConfiguration TaskNetworkConfiguration `codec:"network_configuration"`
}

type TaskAWSVPCConfiguration

type TaskAWSVPCConfiguration struct {
	AssignPublicIP string   `codec:"assign_public_ip"`
	SecurityGroups []string `codec:"security_groups"`
	Subnets        []string `codec:"subnets"`
}

type TaskConfig

type TaskConfig struct {
	Task ECSTaskConfig `codec:"task"`
}

TaskConfig is the driver configuration of a task within a job

type TaskNetworkConfiguration

type TaskNetworkConfiguration struct {
	TaskAWSVPCConfiguration TaskAWSVPCConfiguration `codec:"aws_vpc_configuration"`
}

type TaskState

type TaskState struct {
	TaskConfig    *drivers.TaskConfig
	ContainerName string
	ARN           string
	StartedAt     time.Time
}

TaskState is the state which is encoded in the handle returned in StartTask. This information is needed to rebuild the task state and handler during recovery.

Jump to

Keyboard shortcuts

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