Documentation ¶
Overview ¶
Package prometheus implements a collector of DSMR metrics for Prometheus.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DSMRCollector ¶
DSMRCollector implements the Prometheus Collector interface.
func (*DSMRCollector) Collect ¶
func (dc *DSMRCollector) Collect(ch chan<- prometheus.Metric)
Collect implements part of the prometheus.Collector interface.
func (*DSMRCollector) Describe ¶
func (dc *DSMRCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements part of the prometheus.Collector interface.
func (*DSMRCollector) Update ¶
func (dc *DSMRCollector) Update(f dsmr.Frame)
Update all the metrics to the values of the given frame.
type MetricBuilder ¶
type MetricBuilder struct { ValueType prometheus.ValueType Desc *prometheus.Desc Unit string MetricFunc func(value float64) (prometheus.Metric, error) }
MetricBuilder holds the information needed to create a Prometheus metrics.
func (MetricBuilder) CheckUnit ¶
func (mb MetricBuilder) CheckUnit(unit string) bool
CheckUnit verifies if the given unit is expected for this object.
func (MetricBuilder) String ¶
func (mb MetricBuilder) String() string
Click to show internal directories.
Click to hide internal directories.