gcp

package
v0.0.0-...-0cd89e8 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2016 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// OperationTimeout represents Maximum time(Second) to wait for operation ready.
	OperationTimeout = 180
)

Functions

This section is empty.

Types

type GceConfig

type GceConfig struct {
	Zone        string
	SourceImage string
	Project     string
	Scope       string
	AuthFile    string
	Network     string
	Subnet      string
}

type GcpSvcWrapper

type GcpSvcWrapper struct {
	Project string
	Zone    string
	Service *googlecloud.Service
}

func GetService

func GetService(accountFile string, project string, zone string, scopes []string) (*GcpSvcWrapper, error)

func (*GcpSvcWrapper) AddRoute

func (s *GcpSvcWrapper) AddRoute(name string, ip string) error

func (*GcpSvcWrapper) AttachDisk

func (s *GcpSvcWrapper) AttachDisk(vol string, instance string, device string) error

func (*GcpSvcWrapper) CreateDisk

func (s *GcpSvcWrapper) CreateDisk(vol string, size int64) error

func (*GcpSvcWrapper) DelRoute

func (s *GcpSvcWrapper) DelRoute(name string) error

func (*GcpSvcWrapper) DetatchDisk

func (s *GcpSvcWrapper) DetatchDisk(instance string, device string) error

func (*GcpSvcWrapper) ListInstances

func (s *GcpSvcWrapper) ListInstances() ([]*googlecloud.Instance, error)

func (*GcpSvcWrapper) TagNewInstance

func (s *GcpSvcWrapper) TagNewInstance(name string) error

Jump to

Keyboard shortcuts

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