aws

package
v0.0.0-...-6d89281 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEc2

func GetEc2() (*ec2.EC2, error)

func GetInstanceInfo

func GetInstanceInfo(e *ec2.EC2, instanceId string) (*ec2.Instance, error)

func GetInstances

func GetInstances(tags map[string]string, filter *ec2.Filter) ([]*ec2.Instance, error)

func GetRunningInstances

func GetRunningInstances(tags map[string]string) ([]*ec2.Instance, error)

func KillServer

func KillServer(ctx context.Context, instanceId string) error

func LaunchServer

func LaunchServer(ctx context.Context, config *AwsConfig, instanceType string, tags map[string]string) (*ec2.Instance, error)

LaunchServer TODO: don't take cluster id, should be more generic, maybe just pass in tags?

func RunCommandOnServer

func RunCommandOnServer(ctx context.Context, config *AwsConfig, cmd string, instance *ec2.Instance) error

func RunCommandOnServerWithOutput

func RunCommandOnServerWithOutput(ctx context.Context, config *AwsConfig, cmd string, instance *ec2.Instance) (string, error)

func RunCommandsOnServer

func RunCommandsOnServer(ctx context.Context, config *AwsConfig, cmds []string, instance *ec2.Instance) error

func RunCommandsOnServer2

func RunCommandsOnServer2(ctx context.Context, config *AwsConfig, cmds []string, instance *ec2.Instance, w io.Writer) error

Types

type AwsConfig

type AwsConfig struct {
	SubnetId      string
	KeyPair       string
	PrivateKey    string
	SecurityGroup string
}

func (*AwsConfig) Validate

func (c *AwsConfig) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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