googlecompute

package
v0.0.0-...-15aa78f Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_REGION = "us-central1-f"

Variables

This section is empty.

Functions

func GoogleComputeFromJSON

func GoogleComputeFromJSON(jsonData []byte) (compute.Provider, error)

Types

type GoogleCompute

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

func MakeGoogleCompute

func MakeGoogleCompute(email string, privateKey string, project string) (*GoogleCompute, error)

func (*GoogleCompute) ComputeService

func (gc *GoogleCompute) ComputeService() compute.Service

func (*GoogleCompute) CreateImage

func (gc *GoogleCompute) CreateImage(imageTemplate *compute.Image) (*compute.Image, error)

func (*GoogleCompute) CreateInstance

func (gc *GoogleCompute) CreateInstance(instance *compute.Instance) (*compute.Instance, error)

func (*GoogleCompute) DeleteImage

func (gc *GoogleCompute) DeleteImage(imageID string) error

func (*GoogleCompute) DeleteInstance

func (gc *GoogleCompute) DeleteInstance(instanceID string) error

func (*GoogleCompute) FindFlavor

func (gc *GoogleCompute) FindFlavor(flavor *compute.Flavor) (string, error)

func (*GoogleCompute) FindImage

func (gc *GoogleCompute) FindImage(image *compute.Image) (string, error)

func (*GoogleCompute) GetImage

func (gc *GoogleCompute) GetImage(imageID string) (*compute.Image, error)

func (*GoogleCompute) GetInstance

func (gc *GoogleCompute) GetInstance(instanceID string) (*compute.Instance, error)

func (*GoogleCompute) ListFlavors

func (gc *GoogleCompute) ListFlavors() ([]*compute.Flavor, error)

func (*GoogleCompute) ListImages

func (gc *GoogleCompute) ListImages() ([]*compute.Image, error)

func (*GoogleCompute) ListInstances

func (gc *GoogleCompute) ListInstances() ([]*compute.Instance, error)

func (*GoogleCompute) RebootInstance

func (gc *GoogleCompute) RebootInstance(instanceID string) error

func (*GoogleCompute) StartInstance

func (gc *GoogleCompute) StartInstance(instanceID string) error

func (*GoogleCompute) StopInstance

func (gc *GoogleCompute) StopInstance(instanceID string) error

type GoogleComputeJSONConfig

type GoogleComputeJSONConfig struct {
	Email      string `json:"email"`
	PrivateKey string `json:"private_key"`
	Project    string `json:"project"`
}

type OperationCall

type OperationCall interface {
	Do(opts ...googleapi.CallOption) (*gcompute.Operation, error)
}

Jump to

Keyboard shortcuts

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