CachedGaugeVec is a wrapper for the prometheus.GaugeVec which allows for staging changes in the metrics vector. Calling "WithLabelValues(...)" will update the internal gauge value, but it will not be returned by "Collect(...)" until the "Commit()" method is called. The "Commit()" method resets the i
| 17 | // in the middle of metrics recalculation, between "Reset()" and the last |
| 18 | // "WithLabelValues()" call. |
| 19 | type CachedGaugeVec struct { |
| 20 | m sync.Mutex |
| 21 | |
| 22 | gaugeVec *prometheus.GaugeVec |
| 23 | records []vectorRecord |
| 24 | } |
| 25 | |
| 26 | var _ prometheus.Collector = new(CachedGaugeVec) |
| 27 |
nothing calls this directly
no outgoing calls
no test coverage detected