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

Function getMetricPendingRequestsCallback

internal/pool/pool.go:299–304  ·  view source on GitHub ↗

getMetricPendingRequestsCallback returns the metric callback for pending requests changes (UpDownCounter).

()

Source from the content-addressed store, hash-verified

297
298// getMetricPendingRequestsCallback returns the metric callback for pending requests changes (UpDownCounter).
299func getMetricPendingRequestsCallback() func(ctx context.Context, delta int, cn *Conn, poolName string) {
300 metricCallbackMu.RLock()
301 cb := metricPendingRequestsCallback
302 metricCallbackMu.RUnlock()
303 return cb
304}
305
306// Stats contains pool state information and accumulated stats.
307type Stats struct {

Callers 1

getConnMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected