MCPcopy Create free account
hub / github.com/DoNewsCode/core / newCollector

Function newCollector

otredis/metrics.go:59–65  ·  view source on GitHub ↗

newCollector creates a new redis wrapper containing the name of the redis.

(factory Factory, gauges *Gauges, interval time.Duration)

Source from the content-addressed store, hash-verified

57
58// newCollector creates a new redis wrapper containing the name of the redis.
59func newCollector(factory Factory, gauges *Gauges, interval time.Duration) *collector {
60 return &collector{
61 factory: factory,
62 gauges: gauges,
63 interval: interval,
64 }
65}
66
67// collectConnectionStats collects redis connections for Prometheus to scrape.
68func (d *collector) collectConnectionStats() {

Callers 2

TestCollectorFunction · 0.70
provideRedisFactoryFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestCollectorFunction · 0.56