Documentation ¶
Overview ¶
Package gce provides wrappers around Google Compute Engine (GCE) APIs. It is assumed that the program itself also runs on GCE as APIs operate on the current project/zone.
See https://cloud.google.com/compute/docs for details. In particular, API reference: https://cloud.google.com/compute/docs/reference/latest and Go API wrappers: https://godoc.org/google.golang.org/api/compute/v0.beta
Index ¶
- type Context
- func (ctx *Context) CreateImage(imageName, gcsFile string) error
- func (ctx *Context) CreateInstance(name, machineType, image, sshkey string, preemptible bool) (string, error)
- func (ctx *Context) DeleteImage(imageName string) error
- func (ctx *Context) DeleteInstance(name string, wait bool) error
- func (ctx *Context) IsInstanceRunning(name string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { ProjectID string ZoneID string Instance string InternalIP string ExternalIP string Network string Subnetwork string // contains filtered or unexported fields }
func NewContext ¶
func (*Context) CreateImage ¶
func (*Context) CreateInstance ¶
func (*Context) DeleteImage ¶
func (*Context) IsInstanceRunning ¶
Click to show internal directories.
Click to hide internal directories.