Documentation ¶
Index ¶
- func InstanceIPs(inst *compute.Instance) (intIP, extIP string)
- type API
- func (a *API) Client() *http.Client
- func (a *API) CreateImage(spec *ImageSpec, overwrite bool) (*compute.Operation, *Pending, error)
- func (a *API) CreateInstance(userdata string, keys []*agent.Key) (*compute.Instance, error)
- func (a *API) DeleteImage(name string) (*Pending, error)
- func (a *API) DeprecateImage(name string, state DeprecationState, replacement string) (*Pending, error)
- func (a *API) GC(gracePeriod time.Duration) error
- func (a *API) GetConsoleOutput(name string) (string, error)
- func (a *API) GetPendingForImage(image *compute.Image) (*Pending, error)
- func (a *API) ListImages(ctx context.Context, prefix string) ([]*compute.Image, error)
- func (a *API) ListInstances(prefix string) ([]*compute.Instance, error)
- func (a *API) NewPending(desc string, do doable) *Pending
- func (a *API) TerminateInstance(name string) error
- type DeprecationState
- type ImageSpec
- type Options
- type Pending
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 (*API) CreateImage ¶
CreateImage creates an image on GCE and returns operation details and a Pending. If overwrite is true, an existing image will be overwritten if it exists.
func (*API) CreateInstance ¶
CreateInstance creates a Google Compute Engine instance.
func (*API) DeprecateImage ¶ added in v0.6.0
func (*API) GetConsoleOutput ¶ added in v0.6.0
func (*API) GetPendingForImage ¶ added in v0.6.0
func (*API) ListImages ¶
func (*API) ListInstances ¶
func (*API) NewPending ¶ added in v0.6.0
func (*API) TerminateInstance ¶
type DeprecationState ¶ added in v0.6.0
type DeprecationState string
const ( DeprecationStateActive DeprecationState = "ACTIVE" DeprecationStateDeprecated DeprecationState = "DEPRECATED" DeprecationStateObsolete DeprecationState = "OBSOLETE" DeprecationStateDeleted DeprecationState = "DELETED" )
Click to show internal directories.
Click to hide internal directories.