aws

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAWSSession

func GetAWSSession(region string) (*session.Session, error)

Types

type EC2

type EC2 struct {
	EC2Interface EC2Interface
	STSInterface STSInterface
}

The EC2 auto-discovery Provider queries AWS for running EC2 instances.

Filters

The EC2 Provider accepts the following filters:

- region: The AWS region to query. Defaults to the current region.

In addition to the above filter keys, the EC2 Provider also accepts all keys that are valid for `ec2.DescribeInstanceInput.Filters`, documentation on which is available at https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#DescribeInstancesInput.

Sorting

The EC2 Provider supports sorting by the following keys:

- launchTime

Annotations

The EC2 Provider appends the following annotations to each Prompt:

- launchTime: The EC2 instance launch time.

func (*EC2) Discover

func (provider *EC2) Discover(queries []*jump.PromptQuery) ([]*jump.Prompt, error)

func (*EC2) Initialize

func (provider *EC2) Initialize(providerConfig interface{})

func (*EC2) Query

func (provider *EC2) Query(query *jump.PromptQuery) ([]*jump.Prompt, error)

type EC2Interface

type EC2Interface interface {
	DescribeInstances(input *ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error)
}

type EC2MetadataInterface

type EC2MetadataInterface interface {
	Region() (string, error)
}
var DefaultMetadataInterface EC2MetadataInterface

type EC2ProviderConfig

type EC2ProviderConfig struct {
	EC2Interface EC2Interface
	STSInterface STSInterface
}

type ECS

type ECS struct {
	EC2Interface EC2Interface
	ECSInterface ECSInterface
	STSInterface STSInterface
	// contains filtered or unexported fields
}

The ECS auto-discovery Provider queries ECS for running containers on EC2 instances and constructs the `docker exec` arguments necessary to run a command inside those containers.

Filters

The ECS Provider accepts the following filters:

- region: The AWS region to query. Defaults to the current region. - cluster: The ECS cluster to query. Defaults to the 'default cluster'. - task-group: The name of the ECS Task Group. - container-name: The name of a running Container.

Sorting

The ECS Provider supports sorting by the following keys:

- startedAt

Annotations

The ECS Provider appends the following annotations to each Prompt:

- startedAt: The time the container was started.

func (*ECS) Discover

func (provider *ECS) Discover(queries []*jump.PromptQuery) ([]*jump.Prompt, error)

func (*ECS) Initialize

func (provider *ECS) Initialize(providerConfig interface{})

func (*ECS) Query

func (provider *ECS) Query(query *jump.PromptQuery) ([]*jump.Prompt, error)

type ECSInterface

type ECSInterface interface {
	ListTasks(input *ecs.ListTasksInput) (*ecs.ListTasksOutput, error)
	DescribeTasks(input *ecs.DescribeTasksInput) (*ecs.DescribeTasksOutput, error)
	ListContainerInstances(input *ecs.ListContainerInstancesInput) (*ecs.ListContainerInstancesOutput, error)
	DescribeContainerInstances(input *ecs.DescribeContainerInstancesInput) (*ecs.DescribeContainerInstancesOutput, error)
}

type ECSProviderConfig

type ECSProviderConfig struct {
	EC2Interface EC2Interface
	ECSInterface ECSInterface
	STSInterface STSInterface
}

type MockEC2Metadata

type MockEC2Metadata struct {
}

func (*MockEC2Metadata) Region

func (m *MockEC2Metadata) Region() (string, error)

type MockSTS

type MockSTS struct {
}

func (*MockSTS) GetCallerIdentity

func (s *MockSTS) GetCallerIdentity(input *sts.GetCallerIdentityInput) (*sts.GetCallerIdentityOutput, error)

type STSInterface

type STSInterface interface {
	GetCallerIdentity(input *sts.GetCallerIdentityInput) (*sts.GetCallerIdentityOutput, error)
}
var DefaultSTSInterface STSInterface

Jump to

Keyboard shortcuts

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