internal

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

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

func NewLinuxCommand

func NewLinuxCommand(cfg *Config, instanceID string, command string) (*Command, error)

func (*Command) Result

func (cmd *Command) Result() (string, error)

type Config

type Config struct {
	Account string
	Profile string
	Region  string
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(profile string, region string, timeout time.Duration) (*Config, error)

type Container

type Container struct {
	Task string
	Name string
}

type ContainerFinder

type ContainerFinder interface {
	Find(cluster string) ([]Container, error)
	FindByIdentifier(cluster string, task string, container string) ([]Container, error)
}

func NewContainerFinder

func NewContainerFinder(cfg *Config) ContainerFinder

type EC2Client

type EC2Client interface {
	DescribeInstances(ctx context.Context, params *ec2.DescribeInstancesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstancesOutput, error)
}

type EC2Session

type EC2Session interface {
	Close() error
	RunPlugin() error
	RunSSH(input *RunSSHInput) error
	RunSCP(input *RunSCPInput) error
}

func NewEC2Session

func NewEC2Session(cfg *Config, input *ssm.StartSessionInput) (EC2Session, error)

type ECSClient

type ECSClient interface {
	DescribeTasks(ctx context.Context, params *ecs.DescribeTasksInput, optFns ...func(*ecs.Options)) (*ecs.DescribeTasksOutput, error)
	ListTasks(ctx context.Context, params *ecs.ListTasksInput, optFns ...func(*ecs.Options)) (*ecs.ListTasksOutput, error)
}

type ECSSession

type ECSSession interface {
	Close() error
	RunPlugin() error
}

func NewECSSession

func NewECSSession(cfg *Config, input *ecs.ExecuteCommandInput) (ECSSession, error)

type Instance

type Instance struct {
	Name string
	ID   string
}

type InstanceFinder

type InstanceFinder interface {
	Find() ([]Instance, error)
	FindByIdentifier(identifier string) ([]Instance, error)
}

func NewInstanceFinder

func NewInstanceFinder(cfg *Config) InstanceFinder

type RunSCPInput

type RunSCPInput struct {
	User       string
	InstanceID string
	Identity   string
	Sources    []string
	Target     string
	Mode       SCPMode
}

type RunSSHInput

type RunSSHInput struct {
	User                string
	InstanceID          string
	Identity            string
	LocalPortForwarding string
	Command             string
}

type SCPMode

type SCPMode string
const (
	SCPModeSending   SCPMode = "sending"
	SCPModeReceiving SCPMode = "receiving"
)

type SSMClient

type SSMClient interface {
	DescribeInstanceInformation(ctx context.Context, params *ssm.DescribeInstanceInformationInput, optFns ...func(*ssm.Options)) (*ssm.DescribeInstanceInformationOutput, error)
}

Jump to

Keyboard shortcuts

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