getMetricPendingRequestsCallback returns the metric callback for pending requests changes (UpDownCounter).
()
| 297 | |
| 298 | // getMetricPendingRequestsCallback returns the metric callback for pending requests changes (UpDownCounter). |
| 299 | func 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. |
| 307 | type Stats struct { |