gcloud

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstanceIPs

func InstanceIPs(inst *compute.Instance) (intIP, extIP string)

Taken from: https://github.com/golang/build/blob/master/buildlet/gce.go

Types

type API

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

func New

func New(opts *Options) (*API, error)

func (*API) Client

func (a *API) Client() *http.Client

func (*API) CreateImage

func (a *API) CreateImage(name, source string, overwrite bool) error

CreateImage creates an image on GCE and and wait for completion. If overwrite is true, an existing image will be overwritten if it exists.

func (*API) CreateInstance

func (a *API) CreateInstance(userdata string, keys []*agent.Key) (*compute.Instance, error)

CreateInstance creates a Google Compute Engine instance.

func (*API) ListImages

func (a *API) ListImages(prefix string) ([]string, error)

func (*API) ListInstances

func (a *API) ListInstances(prefix string) ([]*compute.Instance, error)

func (*API) TerminateInstance

func (a *API) TerminateInstance(name string) error

type Options

type Options struct {
	Image       string
	Project     string
	Zone        string
	MachineType string
	DiskType    string
	Network     string
	JSONKeyFile string
	ServiceAuth bool
	*platform.Options
}

Jump to

Keyboard shortcuts

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