MCPcopy
hub / github.com/prometheus/client_golang / init

Method init

prometheus/collector.go:108–110  ·  view source on GitHub ↗

init provides the selfCollector with a reference to the metric it is supposed to collect. It is usually called within the factory function to create a metric. See example.

(self Metric)

Source from the content-addressed store, hash-verified

106// to collect. It is usually called within the factory function to create a
107// metric. See example.
108func (c *selfCollector) init(self Metric) {
109 c.self = self
110}
111
112// Describe implements Collector.
113func (c *selfCollector) Describe(ch chan<- *Desc) {

Callers 9

NewBuildInfoCollectorFunction · 0.95
newValueFuncFunction · 0.80
newBatchHistogramFunction · 0.80
NewCounterFunction · 0.80
NewCounterVecMethod · 0.80
newHistogramFunction · 0.80
newSummaryFunction · 0.80
NewGaugeFunction · 0.80
NewGaugeVecMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected