gce

package
v0.0.0-...-ce252de Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Disk

type Disk struct {
	Type             string          `json:"type"`
	Boot             bool            `json:"boot"`
	Mode             string          `json:"mode"`
	AutoDelete       bool            `json:"autoDelete"`
	DeviceName       string          `json:"deviceName"`
	InitializeParams InitializeParam `json:"initializeParams"`
}

Disk represents GCE disk.

type GCE

type GCE struct {
	Name              string             `json:"name"`
	Zone              string             `json:"zone"`
	MachineType       string             `json:"machineType"`
	Disks             []Disk             `json:"disks"`
	CanIPForward      bool               `json:"canIpForward"`
	NetworkInterfaces []NetworkInterface `json:"networkInterfaces"`
	Description       string             `json:"description"`

	Scheduling `json:"scheduling"`
	// contains filtered or unexported fields
}

GCE struct reperesnts Google Compute Engine.

func (*GCE) CreateNode

func (gce *GCE) CreateNode(request interface{}) (resp interface{}, err error)

func (*GCE) DeleteNode

func (gce *GCE) DeleteNode(request interface{}) (resp interface{}, err error)

func (*GCE) RebootNode

func (gce *GCE) RebootNode(request interface{}) (resp interface{}, err error)

func (*GCE) StartNode

func (gce *GCE) StartNode(request interface{}) (resp interface{}, err error)

func (*GCE) StopNode

func (gce *GCE) StopNode(request interface{}) (resp interface{}, err error)

type GCEResponse

type GCEResponse struct {
	Kind          string `json:"kind"`
	ID            string `json:"id"`
	Name          string `json:"name"`
	Zone          string `json:"zone"`
	OperationType string `json:"operationType"`
	TargetLink    string `json:"targetLink"`
	TargetID      string `json:"targetId"`
	Status        string `json:"status"`
	User          string `json:"user"`
	Progress      int    `json:"progress"`
	InsertTime    string `json:"insertTime"`
	StartTime     string `json:"startTime"`
	EndTime       string `json:"endTime"`
	SelfLink      string `json:"selfLink"`
}

type InitializeParam

type InitializeParam struct {
	SourceImage string `json:"sourceImage"`
	DiskType    string `json:"diskType"`
	DiskSizeGb  string `json:"diskSizeGb"`
}

InitializeParam represents GCE disk InitializeParam.

type NetworkInterface

type NetworkInterface struct {
	Network       string         `json:"network"`
	Subnetwork    string         `json:"subnetwork"`
	AccessConfigs []accessConfig `json:"accessConfigs"`
}

NetworkInterface represents GCE NetworkInterface.

type Scheduling

type Scheduling struct {
	Preemptible       bool   `json:"preemptible"`
	OnHostMaintenance string `json:"onHostMaintenance"`
	AutomaticRestart  bool   `json:"automaticRestart"`
}

Scheduling represents GCE instance Scheduling.

Jump to

Keyboard shortcuts

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