NewGaugeFunc works like the function of the same name in the prometheus package but it automatically registers the GaugeFunc with the Factory's Registerer.
(opts prometheus.GaugeOpts, function func() float64)
| 314 | // package but it automatically registers the GaugeFunc with the Factory's |
| 315 | // Registerer. |
| 316 | func (f Factory) NewGaugeFunc(opts prometheus.GaugeOpts, function func() float64) prometheus.GaugeFunc { |
| 317 | g := prometheus.NewGaugeFunc(opts, function) |
| 318 | if f.r != nil { |
| 319 | f.r.MustRegister(g) |
| 320 | } |
| 321 | return g |
| 322 | } |
| 323 | |
| 324 | // NewSummary works like the function of the same name in the prometheus package |
| 325 | // but it automatically registers the Summary with the Factory's Registerer. |
no test coverage detected