aws

package
v0.0.0-...-5a2d4e6 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AWS_OWNER_ID       = "591542846629"
	CANONICAL_OWNER_ID = "099720109477"
)

Functions

func GetAWSConfigForBucket

func GetAWSConfigForBucket(bucketname string) (*aws.Config, error)

func GetBucketRegion

func GetBucketRegion(bucketname string) (string, error)

Types

type DataSource

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

func NewDataSource

func NewDataSource(region string) *DataSource

func (*DataSource) GetAMI

func (d *DataSource) GetAMI(owner string, filter []Filter) (string, error)

type Filter

type Filter struct {
	Name  string
	Value string
}

type S3

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

func NewS3

func NewS3(config S3Config) *S3

func (*S3) GetObjectScanner

func (s *S3) GetObjectScanner(key string) (*bufio.Scanner, error)

func (*S3) ListObjects

func (s *S3) ListObjects(prefix string) ([]string, error)

func (*S3) RetrieveObject

func (s *S3) RetrieveObject(filename string) ([]byte, error)

type S3Config

type S3Config struct {
	Region string
	Bucket string
}

type SpotInstance

type SpotInstance struct {
	SpotInstanceRequests map[string]*ec2.SpotInstanceRequest
	// contains filtered or unexported fields
}

func NewSpotInstance

func NewSpotInstance(config SpotInstanceConfig) *SpotInstance

func (*SpotInstance) GetSpotInstanceRequestInstanceId

func (s *SpotInstance) GetSpotInstanceRequestInstanceId(requestId string) string

func (*SpotInstance) GetSpotInstanceRequestStatus

func (s *SpotInstance) GetSpotInstanceRequestStatus(requestId string) (string, string, error)

func (*SpotInstance) LaunchSpotInstance

func (s *SpotInstance) LaunchSpotInstance() (string, error)

func (*SpotInstance) SetLaunchSpecification

func (s *SpotInstance) SetLaunchSpecification(input []byte) error

func (*SpotInstance) SetLaunchSpecificationUserdata

func (s *SpotInstance) SetLaunchSpecificationUserdata(userdata string)

type SpotInstanceConfig

type SpotInstanceConfig struct {
	Input      string
	Executable string
	Cmd        string
	Region     string
	LogGroup   string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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