Register registers metrics for the rest client to use. This can only be called once.
(lm LatencyMetric, rm ResultMetric)
| 46 | // Register registers metrics for the rest client to use. This can |
| 47 | // only be called once. |
| 48 | func Register(lm LatencyMetric, rm ResultMetric) { |
| 49 | registerMetrics.Do(func() { |
| 50 | RequestLatency = lm |
| 51 | RequestResult = rm |
| 52 | }) |
| 53 | } |
| 54 | |
| 55 | type noopLatency struct{} |
| 56 |