gce

package
v0.0.0-...-7759ae7 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CategoryUnknown string = "unknown"
)

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) (*data.InstanceType, error)

func ParseRegion

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

func ParseZoneFromUrl

func ParseZoneFromUrl(url string) (string, error)

Types

type Client

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

func NewClient

func NewClient(gecProjectId, credentialFilePath string) (*Client, error)

func (*Client) GetCredentials

func (g *Client) GetCredentials() []data.CredentialFormat

func (*Client) GetEnvs

func (g *Client) GetEnvs() []string

func (*Client) GetInstanceTypes

func (g *Client) GetInstanceTypes() ([]data.InstanceType, error)

func (*Client) GetKubernets

func (g *Client) GetKubernets() []data.Kubernetes

func (*Client) GetName

func (g *Client) GetName() string

func (*Client) GetRegions

func (g *Client) GetRegions() ([]data.Region, error)

func (*Client) GetZones

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

type GceData

type GceData data.CloudData

Jump to

Keyboard shortcuts

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