provider

package
v0.0.0-...-22a6142 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EC2

type EC2 struct {
	AccessKeyID     string
	SecretAccessKey string
	Region          string
	InstanceID      string
	UseInternalIP   bool
	// contains filtered or unexported fields
}

EC2 ..

func NewEC2

func NewEC2(AccessKeyID, SecretAccessKey, Region, InstanceID string, UseInternalIP bool) *EC2

NewEC2 ..

func (*EC2) Hash

func (p *EC2) Hash() string

Hash ...

func (*EC2) IP

func (p *EC2) IP() (string, error)

IP ...

func (*EC2) Start

func (p *EC2) Start() error

Start ...

func (*EC2) Status

func (p *EC2) Status() (StatusInstance, error)

Status ...

func (*EC2) Stop

func (p *EC2) Stop() error

Stop ...

func (*EC2) String

func (p *EC2) String() string

String ...

type GCE

type GCE struct {
	JWTPath       string
	ProjectID     string
	Zone          string
	Name          string
	UseInternalIP bool
	// contains filtered or unexported fields
}

GCE ..

func NewGCE

func NewGCE(JWTPath, ProjectID, Zone, Name string, UseInternalIP bool) *GCE

NewGCE ..

func (*GCE) Hash

func (p *GCE) Hash() string

Hash ...

func (*GCE) IP

func (p *GCE) IP() (string, error)

IP ...

func (*GCE) Start

func (p *GCE) Start() error

Start ...

func (*GCE) Status

func (p *GCE) Status() (StatusInstance, error)

Status ...

func (*GCE) Stop

func (p *GCE) Stop() error

Stop ...

func (*GCE) String

func (p *GCE) String() string

String ...

type Provider

type Provider interface {
	String() string
	Hash() string
	Status() (StatusInstance, error)
	IP() (string, error)
	Start() error
	Stop() error
}

Provider ..

type StatusInstance

type StatusInstance int

StatusInstance ...

const (
	// StatusInstanceNotAvailable ...
	StatusInstanceNotAvailable StatusInstance = iota
	// StatusInstanceStarting ...
	StatusInstanceStarting
	// StatusInstanceNotRun ...
	StatusInstanceNotRun
	// StatusInstanceStopping ...
	StatusInstanceStopping
	// StatusInstanceRunning ...
	StatusInstanceRunning
	// StatusInstanceError ...
	StatusInstanceError
)

func (StatusInstance) String

func (status StatusInstance) String() string

Jump to

Keyboard shortcuts

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