Documentation
¶
Index ¶
- Constants
- Variables
- func NewPricing() *pricing
- type Collector
- func (c *Collector) Collect(ctx context.Context, ch chan<- prometheus.Metric) error
- func (c *Collector) CollectMetrics(_ chan<- prometheus.Metric) float64
- func (c *Collector) Describe(ch chan<- *prometheus.Desc) error
- func (c *Collector) Name() string
- func (c *Collector) Register(registry provider.Registry) error
- type Config
- type ForwardingRuleInfo
- type ParsedSkuData
Constants ¶
View Source
const (
PriceRefreshInterval = 24 * time.Hour
)
Variables ¶
View Source
var ( ForwardingRuleUnitCostDesc = prometheus.NewDesc( prometheus.BuildFQName(cloudcostexporter.MetricPrefix, subsystem, fwdRuleMetricName), fwdRuleDescription, []string{"name", "region", "project", "ip_address", "load_balancing_scheme"}, nil, ) ForwardingRuleInboundDataProcessedCostDesc = prometheus.NewDesc( prometheus.BuildFQName(cloudcostexporter.MetricPrefix, subsystem, fwdRuleInboundDataMetricName), fwdRuleInboundDataDescription, []string{"name", "region", "project", "ip_address", "load_balancing_scheme"}, nil, ) ForwardingRuleOutboundDataProcessedCostDesc = prometheus.NewDesc( prometheus.BuildFQName(cloudcostexporter.MetricPrefix, subsystem, fwdRuleOutboundDataMetricName), fwdRuleOutboundDataDescription, []string{"name", "region", "project", "ip_address", "load_balancing_scheme"}, nil, ) )
View Source
var ( ResourceGroup = "LoadBalancing" ErrRefreshingPricingMap = errors.New("error refreshing pricing map") ErrGettingNetworkingServiceName = errors.New("error getting networking service name") ErrNoSKUsFoundForNetworkingService = errors.New("no skus found for networking service") ErrParsingSKUs = errors.New("error parsing skus") ErrRegionNotFound = errors.New("region not found") ErrUnknownDescription = errors.New("unknown description") )
Functions ¶
func NewPricing ¶
func NewPricing() *pricing
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
func (*Collector) CollectMetrics ¶
func (c *Collector) CollectMetrics(_ chan<- prometheus.Metric) float64
type ForwardingRuleInfo ¶
type ParsedSkuData ¶
func NewParsedSkuData ¶
func NewParsedSkuData(region string, price float64, description string) *ParsedSkuData
Click to show internal directories.
Click to hide internal directories.