MCPcopy
hub / github.com/redis/go-redis / getMetricConnectionCountCallback

Function getMetricConnectionCountCallback

internal/pool/pool.go:291–296  ·  view source on GitHub ↗

getMetricConnectionCountCallback returns the metric callback for connection count changes (UpDownCounter).

()

Source from the content-addressed store, hash-verified

289
290// getMetricConnectionCountCallback returns the metric callback for connection count changes (UpDownCounter).
291func getMetricConnectionCountCallback() func(ctx context.Context, delta int, cn *Conn, state string, isPubSub bool) {
292 metricCallbackMu.RLock()
293 cb := metricConnectionCountCallback
294 metricCallbackMu.RUnlock()
295 return cb
296}
297
298// getMetricPendingRequestsCallback returns the metric callback for pending requests changes (UpDownCounter).
299func getMetricPendingRequestsCallback() func(ctx context.Context, delta int, cn *Conn, poolName string) {

Callers 11

TrackConnMethod · 0.85
UntrackConnMethod · 0.85
CloseMethod · 0.85
addIdleConnMethod · 0.85
newConnMethod · 0.85
getConnMethod · 0.85
putIdleConnMethod · 0.85
putConnMethod · 0.85
removeConnInternalMethod · 0.85
CloseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected