Documentation ¶
Index ¶
Constants ¶
View Source
const (
AZ_API_VERSION string = "2023-01-01-preview" // using latest API Version https://learn.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices
)
Variables ¶
View Source
var ( ErrClientCreationFailure = errors.New("failed to create client") ErrPageAdvanceFailure = errors.New("failed to advance page") )
Errors
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct { PriceStore *PriceStore // contains filtered or unexported fields }
Collector is a prometheus collector that collects metrics from AKS clusters.
func (*Collector) Collect ¶
func (c *Collector) Collect(ch chan<- prometheus.Metric) error
Collect satisfies the provider.Collector interface.
func (*Collector) CollectMetrics ¶
func (c *Collector) CollectMetrics(_ chan<- prometheus.Metric) float64
CollectMetrics is a no-op function that satisfies the provider.Collector interface. Deprecated: CollectMetrics is deprecated and will be removed in a future release.
type Config ¶
type Config struct { Logger *slog.Logger Credentials *azidentity.DefaultAzureCredential SubscriptionId string }
type MachineOperatingSystem ¶ added in v0.1.6
type MachineOperatingSystem int
const ( Linux MachineOperatingSystem = iota Windows )
func (MachineOperatingSystem) String ¶ added in v0.1.6
func (o MachineOperatingSystem) String() string
type MachinePriority ¶ added in v0.1.6
type MachinePriority int
const ( OnDemand MachinePriority = iota Spot )
func (MachinePriority) String ¶ added in v0.1.6
func (v MachinePriority) String() string
type PriceByOperatingSystem ¶ added in v0.1.6
type PriceByOperatingSystem map[MachineOperatingSystem]PriceBySku
type PriceByPriority ¶ added in v0.1.6
type PriceByPriority map[MachinePriority]PriceByOperatingSystem
type PriceBySku ¶ added in v0.1.6
type PriceBySku map[string]retailPriceSdk.ResourceSKU
type PriceStore ¶ added in v0.1.6
type PriceStore struct { RegionMap map[string]PriceByPriority Cache map[string]*retailPriceSdk.ResourceSKU // contains filtered or unexported fields }
func NewPricingStore ¶ added in v0.1.6
func NewPricingStore(subId string, priceClient *retailPriceSdk.RetailPricesClient, parentLogger *slog.Logger, parentContext context.Context) *PriceStore
func (*PriceStore) GetVmPrice ¶ added in v0.1.6
func (p *PriceStore) GetVmPrice()
TODO - implement ability to lookup a certain VM's Price by it's ID
func (*PriceStore) PopulatePriceStore ¶ added in v0.1.6
func (p *PriceStore) PopulatePriceStore(locationList []string) error
Click to show internal directories.
Click to hide internal directories.