aws

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TagCluster = "Cluster"
	TagRole    = "Role"
)

Tag keys for aws resources:

Variables

View Source
var (
	ErrInvalidKeys        = errors.New("aws: invalid keys")
	ErrNoRegionProvided   = errors.New("aws: region should shouldn't be emplty")
	ErrInstanceIDEmpty    = errors.New("aws: instance id shouldn't be emplty")
	ErrNoInstancesCreated = errors.New("aws: no instances were created")
)

AWS client specific errors:

Functions

This section is empty.

Types

type Client

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

func New

func New(keyID, secret string) (*Client, error)

New returns a configured AWS client.

func (*Client) CreateInstance

func (c *Client) CreateInstance(ctx context.Context, cfg InstanceConfig) error

CreateInstance start a new instance due to the config.

func (*Client) DeleteInstance

func (c *Client) DeleteInstance(ctx context.Context, region, instanceID string) error

DeleteInstance terminates an instance with provided id and region.

type InstanceConfig

type InstanceConfig struct {
	ClusterName    string
	ClusterRole    string
	ID             string
	Region         string
	ImageID        string
	KeyName        string
	HasPublicAddr  bool
	SecurityGroups []*string
	SubnetID       string
	IAMRole        string
	VolumeType     string
	VolumeSize     int64
	Tags           map[string]string
}

Jump to

Keyboard shortcuts

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