aws_client

package
v0.0.0-...-a003d8d Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AMI_ID                = "ami-dc5e75b4" //"ami-ecb68a84"
	SECURITY_GROUP_ID     = "sg-b23aead6"
	SUBNET_ID             = "subnet-0c75a427"
	KEYPAIR_NAME          = "broker_keypair"
	INSTANCE_TYPE         = "t2.micro"
	LINUX_USER            = "ubuntu"
	KEYPAIR_DIR_NAME      = ".gsb"
	PIRVATE_KEY_FILE_NAME = "broker_id_rsa"
	PUBLIC_KEY_FILE_NAME  = "broker_id_rsa.pub"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSClient

type AWSClient struct {
	EC2Client *ec2.EC2
}

func NewClient

func NewClient(region string) *AWSClient

func (*AWSClient) CreateInstance

func (c *AWSClient) CreateInstance(parameters interface{}) (string, error)

func (*AWSClient) DeleteInstance

func (c *AWSClient) DeleteInstance(instanceId string) error

func (*AWSClient) GetInstanceState

func (c *AWSClient) GetInstanceState(instanceId string) (string, error)

func (*AWSClient) InjectKeyPair

func (c *AWSClient) InjectKeyPair(instanceId string) (string, string, string, error)

func (*AWSClient) RevokeKeyPair

func (c *AWSClient) RevokeKeyPair(instanceId string, privateKey string) error

type Client

type Client interface {
	CreateInstance(parameters interface{}) (string, error)
	GetInstanceState(instanceId string) (string, error)
	InjectKeyPair(instanceId string) (string, string, string, error)
	DeleteInstance(instanceId string) error
	RevokeKeyPair(instanceId string, privateKey string) error
}

Jump to

Keyboard shortcuts

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