gce

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseCategoryFromSKU

func ParseCategoryFromSKU(sku string) string

gce SKU format: [something]-category-somethin/empty

func ParseMachine

func ParseMachine(machine *compute.MachineType) (*v1.MachineType, error)

func ParseRegion

func ParseRegion(region *compute.Region) (*v1.Region, error)

func ParseZoneFromUrl

func ParseZoneFromUrl(url string) (string, error)

Types

type Client

type Client struct {
	GceProjectID   string
	ComputeService *compute.Service
	Ctx            context.Context
}

func NewClient

func NewClient(opts credential.GCE) (*Client, error)

func (*Client) GetCredentialFormat

func (g *Client) GetCredentialFormat() v1.CredentialFormat

func (*Client) GetName

func (g *Client) GetName() string

func (*Client) ListMachineTypes

func (g *Client) ListMachineTypes() ([]v1.MachineType, error)

func (*Client) ListRegions

func (g *Client) ListRegions() ([]v1.Region, error)

func (*Client) ListZones

func (g *Client) ListZones() ([]string, error)

Jump to

Keyboard shortcuts

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