Documentation
¶
Overview ¶
Package prometheusbp provides common code used by Baseplate.go regarding Prometheus metrics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HighWatermarkGauge ¶
type HighWatermarkGauge struct {
*HighWatermarkValue
// Optional gauge to report the current value when scraped
CurrGauge *prometheus.Desc
CurrGaugeLabelValues []string
// Optional gauge to report the max value when scraped
MaxGauge *prometheus.Desc
MaxGaugeLabelValues []string
}
HighWatermarkGauge implements a prometheus.Collector that reports up to 2 gauges backed by a HighWatermarkValue.
func (HighWatermarkGauge) Collect ¶
func (hwg HighWatermarkGauge) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector.
func (HighWatermarkGauge) Describe ¶
func (hwg HighWatermarkGauge) Describe(ch chan<- *prometheus.Desc)
Describe implements prometheus.Collector.
type HighWatermarkValue ¶
type HighWatermarkValue struct {
// contains filtered or unexported fields
}
HighWatermarkValue implements an int64 gauge with high watermark value.
func (*HighWatermarkValue) Dec ¶
func (hwv *HighWatermarkValue) Dec()
Dec decreases the gauge value by 1.
func (*HighWatermarkValue) Get ¶
func (hwv *HighWatermarkValue) Get() int64
Get gets the current gauge value.
func (*HighWatermarkValue) Inc ¶
func (hwv *HighWatermarkValue) Inc()
Inc increases the gauge value by 1.
func (*HighWatermarkValue) Max ¶
func (hwv *HighWatermarkValue) Max() int64
Max returns the max gauge value (the high watermark).
func (*HighWatermarkValue) Set ¶
func (hwv *HighWatermarkValue) Set(v int64)
Set sets the current value, and updates high watermark if needed.
Click to show internal directories.
Click to hide internal directories.