google

package
v0.0.0-...-2215086 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Credentials     string
	CredentialsFile string

	Project string
}

type GceInfoer

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

GceInfoer encapsulates the data and operations needed to access external resources

func NewGoogleInfoer

func NewGoogleInfoer(config Config, logger cloudinfo.Logger) (*GceInfoer, error)

NewGoogleInfoer creates a new instance of the Google infoer.

func (*GceInfoer) GetCurrentPrices

func (g *GceInfoer) GetCurrentPrices(region string) (map[string]types.Price, error)

GetCurrentPrices retrieves all the spot prices in a region

func (*GceInfoer) GetProducts

func (g *GceInfoer) GetProducts(vms []types.VMInfo, service, regionId string) ([]types.VMInfo, error)

GetProducts retrieves the available virtual machines based on the arguments provided Queries the Google Cloud Compute API's machine type list endpoint and CloudBilling's sku list endpoint

func (*GceInfoer) GetRegions

func (g *GceInfoer) GetRegions(service string) (map[string]string, error)

GetRegions returns a map with available regions transforms the api representation into a "plain" map

func (*GceInfoer) GetServiceImages

func (g *GceInfoer) GetServiceImages(service, region string) ([]types.Image, error)

GetServiceImages retrieves the images supported by the given service in the given region

func (*GceInfoer) GetServiceProducts

func (g *GceInfoer) GetServiceProducts(region, service string) ([]types.ProductDetails, error)

GetServiceProducts retrieves the products supported by the given service in the given region

func (*GceInfoer) GetVersions

func (g *GceInfoer) GetVersions(service, region string) ([]types.LocationVersion, error)

GetVersions retrieves the kubernetes versions supported by the given service in the given region

func (*GceInfoer) GetVirtualMachines

func (g *GceInfoer) GetVirtualMachines(region string) ([]types.VMInfo, error)

func (*GceInfoer) GetZones

func (g *GceInfoer) GetZones(region string) ([]string, error)

GetZones returns the availability zones in a region

func (*GceInfoer) HasImages

func (g *GceInfoer) HasImages() bool

HasImages - Google doesn't support images

func (*GceInfoer) HasShortLivedPriceInfo

func (g *GceInfoer) HasShortLivedPriceInfo() bool

HasShortLivedPriceInfo - Google Cloud has static prices for preemptible instances as well

func (*GceInfoer) Initialize

func (g *GceInfoer) Initialize() (map[string]map[string]types.Price, error)

Initialize downloads and parses the SKU list of the Compute Engine service

type GceNetworkMapper

type GceNetworkMapper struct {
}

GceNetworkMapper module object for handling Google Cloud specific VM to Networking capabilities mapping

func (*GceNetworkMapper) MapNetworkPerf

func (nm *GceNetworkMapper) MapNetworkPerf(ntwPerf string) (string, error)

MapNetworkPerf maps the network performance of the google instance to the category supported by telescopes

Jump to

Keyboard shortcuts

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