Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Initializer ¶
type Initializer interface { // NewCounter returns a function to increment for the given metric. NewCounter(name string) func(delta uint64) // NewPerNodeCounter returns a function to increment for the given metric, // but requires a node index for initialization. NewPerNodeCounter(name string, nodeIndex int) func(delta uint64) // NewGauge returns a function to set the value for the given metric. NewGauge(name, unit string) func(value float64) }
Metrics registers Counter and Gauge metrics.
type Metrics ¶
type Metrics struct {
Registry *prometheus.Registry
}
Metrics stores health metrics for the process. It has a gauge and counter metrics.
func (*Metrics) NewCounter ¶
NewCounter returns a func to be used increment the counter total.
func (*Metrics) NewPerNodeCounter ¶
NewCounter returns a func to be used increment the counter total.
type NullMetrics ¶
type NullMetrics struct{}
NullMetrics are the default metrics.
func (NullMetrics) NewCounter ¶
func (m NullMetrics) NewCounter(name string) func(uint64)
func (NullMetrics) NewGauge ¶
func (m NullMetrics) NewGauge(name, unit string) func(float64)
func (NullMetrics) NewPerNodeCounter ¶
func (m NullMetrics) NewPerNodeCounter(name string, nodeIndex int) func(uint64)
Click to show internal directories.
Click to hide internal directories.