Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricTemplate ¶
type MetricTemplate struct { Name string Help string Labels []string Type Type CollectFunc func(interface{}, ...interface{}) (*[]float64, *[][]string, error) // contains filtered or unexported fields }
MetricTemplate define a template for metrics of same kind. It holds all necessary information about the metric and instructions how to collect metric samples.
func (*MetricTemplate) Collect ¶
func (m *MetricTemplate) Collect(ch chan<- prometheus.Metric, obj interface{}, parameters ...interface{})
Collect triggers the collection of metric samples which are created based on template by executing the internal CollectFunc.
func (*MetricTemplate) Register ¶
func (m *MetricTemplate) Register(ch chan<- *prometheus.Desc)
Register registers the MetricTemplate to the Prometheus Gatherer to allow the collection of metric samples which are created based on the template.
Click to show internal directories.
Click to hide internal directories.