ec2

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandRunner

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

func NewCommandRunner

func NewCommandRunner(cfg *config.Config, inst *Instance, command []string) (*CommandRunner, error)

func (*CommandRunner) Result

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

type Instance

type Instance struct {
	Name     string
	ID       string
	Platform string
}

An object representing an instance.

type InstanceFinder

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

func NewInstanceFinder

func NewInstanceFinder(cfg *config.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 Session

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

func NewSession

func NewSession(cfg *config.Config, input *aws_ssm.StartSessionInput) (Session, error)

Jump to

Keyboard shortcuts

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