client

package
v0.0.0-...-404270f Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2016 License: Apache-2.0 Imports: 12 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 NewAWSClient

func NewAWSClient(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)

state == pending, running, succeeded, failed

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
}

type SoftLayerClient

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

func NewSoftLayerClient

func NewSoftLayerClient() *SoftLayerClient

func (*SoftLayerClient) CreateInstance

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

func (*SoftLayerClient) DeleteInstance

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

func (*SoftLayerClient) GetInstanceState

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

state == pending, running, succeeded, failed

func (*SoftLayerClient) InjectKeyPair

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

func (*SoftLayerClient) RevokeKeyPair

func (c *SoftLayerClient) RevokeKeyPair(instanceId string, privateKeyName string) error

Jump to

Keyboard shortcuts

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