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

Function GetMetricConnectionCreateTimeCallback

internal/pool/pool.go:226–231  ·  view source on GitHub ↗

GetMetricConnectionCreateTimeCallback returns the metric callback for connection creation time.

()

Source from the content-addressed store, hash-verified

224
225// GetMetricConnectionCreateTimeCallback returns the metric callback for connection creation time.
226func GetMetricConnectionCreateTimeCallback() func(ctx context.Context, duration time.Duration, cn *Conn) {
227 metricCallbackMu.RLock()
228 cb := metricConnectionCreateTimeCallback
229 metricCallbackMu.RUnlock()
230 return cb
231}
232
233// GetMetricConnectionRelaxedTimeoutCallback returns the metric callback for connection relaxed timeout changes.
234// This is used by maintnotifications to record relaxed timeout metrics.

Callers 3

_getConnMethod · 0.92
dialConnMethod · 0.85
getConnMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected