ecs

package
v0.0.136 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultWatchInterval = 1 * time.Second

Variables

This section is empty.

Functions

func ExecCommand

func ExecCommand(ctx context.Context, infra Outputs, taskId string, containerName string, cmd []string, parameters map[string][]string) error

func GetRandomTask

func GetRandomTask(ctx context.Context, infra Outputs) (string, error)

func GetService

func GetService(ctx context.Context, infra Outputs) (*ecstypes.Service, error)

func GetTargetGroupHealth

func GetTargetGroupHealth(ctx context.Context, infra Outputs, targetGroupArn string) ([]elbv2types.TargetHealthDescription, error)

func GetTasks

func GetTasks(ctx context.Context, infra Outputs) ([]string, error)

func NewRemoter

func NewRemoter(ctx context.Context, osWriters logging.OsWriters, source outputs.RetrieverSource, appDetails app.Details) (admin.Remoter, error)

func NewStatuser

func NewStatuser(ctx context.Context, osWriters logging.OsWriters, source outputs.RetrieverSource, appDetails app.Details) (admin.Statuser, error)

func RunTask added in v0.0.105

func RunTask(ctx context.Context, infra Outputs, containerName, username string, cmd []string, logStreamer app.LogStreamer, logEmitter app.LogEmitter) error

Types

type ClusterNamespaceOutputs added in v0.0.100

type ClusterNamespaceOutputs struct {
	ClusterArn string         `ns:"cluster_arn"`
	Cluster    ClusterOutputs `ns:"connectionContract:cluster/aws/ecs:*,optional"`
}

type ClusterOutputs

type ClusterOutputs struct {
	ClusterArn string         `ns:"cluster_arn"`
	Network    NetworkOutputs `ns:"connectionContract:network/aws/*,optional"`
}

type NetworkOutputs added in v0.0.105

type NetworkOutputs struct {
	PrivateSubnetIds []string `ns:"private_subnet_ids"`
}

type Outputs

type Outputs struct {
	Region             string     `ns:"region"`
	ServiceName        string     `ns:"service_name"`
	TaskArn            string     `ns:"task_arn"`
	MainContainerName  string     `ns:"main_container_name,optional"`
	Deployer           nsaws.User `ns:"deployer,optional"`
	AppSecurityGroupId string     `ns:"app_security_group_id"`
	LaunchType         string     `ns:"launch_type,optional"`

	Cluster          ClusterOutputs          `ns:",connectionContract:cluster/aws/ecs:*,optional"`
	ClusterNamespace ClusterNamespaceOutputs `ns:",connectionContract:cluster-namespace/aws/ecs:*,optional"`
}

func (*Outputs) ClusterArn added in v0.0.100

func (o *Outputs) ClusterArn() string

func (*Outputs) GetLaunchType added in v0.0.105

func (o *Outputs) GetLaunchType() types.LaunchType

func (*Outputs) InitializeCreds added in v0.0.133

func (o *Outputs) InitializeCreds(source outputs.RetrieverSource, ws *nstypes.Workspace)

func (*Outputs) PrivateSubnetIds added in v0.0.105

func (o *Outputs) PrivateSubnetIds() []string

type Remoter

type Remoter struct {
	OsWriters logging.OsWriters
	Details   app.Details
	Infra     Outputs
}

func (Remoter) Exec

func (r Remoter) Exec(ctx context.Context, options admin.RemoteOptions, cmd []string) error

func (Remoter) Run added in v0.0.135

func (r Remoter) Run(ctx context.Context, options admin.RunOptions, cmd []string) error

func (Remoter) Ssh

func (r Remoter) Ssh(ctx context.Context, options admin.RemoteOptions) error

type Statuser

type Statuser struct {
	OsWriters logging.OsWriters
	Details   app.Details
	Infra     Outputs
}

func (Statuser) Status

func (s Statuser) Status(ctx context.Context) (admin.StatusReport, error)

func (Statuser) StatusDetail

func (s Statuser) StatusDetail(ctx context.Context) (admin.StatusDetailReports, error)

Jump to

Keyboard shortcuts

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