gcp

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client represents a GCP Client

func NewClient

func NewClient(credentials *google.Credentials) (*Client, error)

func (*Client) CreateInstance

func (c *Client) CreateInstance(projectID, zone string, instance *computev1.Instance) error

Creates an instance resource in the specified project using the data included in the request.

func (*Client) GetInstance

func (c *Client) GetInstance(projectID, zone, instanceName string) (computev1.Instance, error)

gets instance given an ID , zone , and instance name

func (*Client) GetInstancePorts

func (c *Client) GetInstancePorts(projectID, zone, instanceName string) (*computev1.SerialPortOutput, error)

func (*Client) ListMachineTypes

func (c *Client) ListMachineTypes(projectID, zone string) (map[string]bool, error)

returns a map of all machineTypes with the machinetype string as the key and bool true if found

func (*Client) SetInstanceLabels

func (c *Client) SetInstanceLabels(projectID, zone, instanceName string, labelReq *computev1.InstancesSetLabelsRequest) error

send request to apply tags, return error if tags are invalid

func (*Client) TerminateComputeServiceInstance

func (c *Client) TerminateComputeServiceInstance(projectID, zone, instanceName string) error

terminateComputeServiceInstance terminates target ComputeService instance uses c.output to store result of the execution

Jump to

Keyboard shortcuts

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