Documentation ¶
Index ¶
- type AzureInfoer
- func (a *AzureInfoer) GetCurrentPrices(region string) (map[string]types.Price, error)
- func (a *AzureInfoer) GetProducts(vms []types.VMInfo, service, regionId string) ([]types.VMInfo, error)
- func (a *AzureInfoer) GetRegions(service string) (map[string]string, error)
- func (a *AzureInfoer) GetServiceImages(service, region string) ([]types.Image, error)
- func (a *AzureInfoer) GetServiceProducts(region, service string) ([]types.ProductDetails, error)
- func (a *AzureInfoer) GetVersions(service, region string) ([]types.LocationVersion, error)
- func (a *AzureInfoer) GetVirtualMachines(region string) ([]types.VMInfo, error)
- func (a *AzureInfoer) GetZones(region string) ([]string, error)
- func (a *AzureInfoer) HasImages() bool
- func (a *AzureInfoer) HasShortLivedPriceInfo() bool
- func (a *AzureInfoer) Initialize() (map[string]map[string]types.Price, error)
- type Config
- type LocationRetriever
- type PriceRetriever
- type ProviderSource
- type ResourceSkuRetriever
- type VersionRetriever
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureInfoer ¶
type AzureInfoer struct {
// contains filtered or unexported fields
}
AzureInfoer encapsulates the data and operations needed to access external Azure resources
func NewAzureInfoer ¶
func NewAzureInfoer(config Config, logger cloudinfo.Logger) (*AzureInfoer, error)
NewAzureInfoer creates a new instance of the Azure infoer.
func (*AzureInfoer) GetCurrentPrices ¶
GetCurrentPrices retrieves all the price info in a region
func (*AzureInfoer) GetProducts ¶
func (a *AzureInfoer) GetProducts(vms []types.VMInfo, service, regionId string) ([]types.VMInfo, error)
GetProducts retrieves the available virtual machines based on the arguments provided
func (*AzureInfoer) GetRegions ¶
func (a *AzureInfoer) GetRegions(service string) (map[string]string, error)
GetRegions returns a map with available regions transforms the api representation into a "plain" map
func (*AzureInfoer) GetServiceImages ¶
func (a *AzureInfoer) GetServiceImages(service, region string) ([]types.Image, error)
GetServiceImages retrieves the images supported by the given service in the given region
func (*AzureInfoer) GetServiceProducts ¶
func (a *AzureInfoer) GetServiceProducts(region, service string) ([]types.ProductDetails, error)
GetServiceProducts retrieves the products supported by the given service in the given region
func (*AzureInfoer) GetVersions ¶
func (a *AzureInfoer) GetVersions(service, region string) ([]types.LocationVersion, error)
GetVersions retrieves the kubernetes versions supported by the given service in the given region
func (*AzureInfoer) GetVirtualMachines ¶
func (a *AzureInfoer) GetVirtualMachines(region string) ([]types.VMInfo, error)
func (*AzureInfoer) GetZones ¶
func (a *AzureInfoer) GetZones(region string) ([]string, error)
GetZones returns the availability zones in a region Zones are currently only returned by the SKU (https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list#resourceskulocationinfo)
func (*AzureInfoer) HasImages ¶
func (a *AzureInfoer) HasImages() bool
HasImages - Azure doesn't support images
func (*AzureInfoer) HasShortLivedPriceInfo ¶
func (a *AzureInfoer) HasShortLivedPriceInfo() bool
HasShortLivedPriceInfo - Azure doesn't have frequently changing prices
func (*AzureInfoer) Initialize ¶
Initialize downloads and parses the Rate Card API's meter list on Azure
type LocationRetriever ¶
type LocationRetriever interface {
ListLocations(ctx context.Context, subscriptionID string) (result subscriptions.LocationListResult, err error)
}
LocationRetriever collects regions
type PriceRetriever ¶
type PriceRetriever interface {
Get(ctx context.Context, filter string) (result commerce.ResourceRateCardInfo, err error)
}
PriceRetriever collects prices
type ProviderSource ¶
type ProviderSource interface {
Get(ctx context.Context, resourceProviderNamespace string, expand string) (result resources.Provider, err error)
}
ProviderSource returns the available location per provider
type ResourceSkuRetriever ¶
type ResourceSkuRetriever interface {
List(ctx context.Context) (result skus.ResourceSkusResultPage, err error)
}
ResourceSkuRetriever list of operations for retrieving virtual machines information
type VersionRetriever ¶
type VersionRetriever interface {
ListOrchestrators(ctx context.Context, location string, resourceType string) (result containerservice.OrchestratorVersionProfileListResult, err error)
}
VersionRetriever collects k8s versions