Documentation
¶
Index ¶
- Constants
- Variables
- type Collector
- func (c *Collector) Collect(ctx context.Context, ch chan<- prometheus.Metric) error
- func (c *Collector) CollectMetrics(ch 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
Constants ¶
View Source
const (
CostRefreshInterval = 24 * time.Hour
)
Variables ¶
View Source
var ( ErrInstanceNotFound = errors.New("instance not found") ErrPriceNotFound = errors.New("price not found for instance") ErrInvalidTier = errors.New("invalid tier format") ErrRegionNotFound = errors.New("region not found in pricing") ErrCustomPriceMissing = errors.New("custom pricing (CPU/RAM) not available") )
View Source
var ( HourlyGaugeDesc = utils.GenerateDesc( cloudcost_exporter.MetricPrefix, subsystem, "cost_usd_per_hour", "Hourly cost of GCP cloudsql instances by instance name, region and sku. Cost represented in USD/hour", []string{"instance", "region", "sku"}, ) )
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
func (*Collector) CollectMetrics ¶
func (c *Collector) CollectMetrics(ch chan<- prometheus.Metric) float64
Click to show internal directories.
Click to hide internal directories.