const namespace … const subsystem … var clusterIPAllocated … var clusterIPAvailable … var clusterIPAllocations … var clusterIPAllocationErrors … var clusterIPAllocationLatency … var registerMetricsOnce … func registerMetrics() { … } type metricsRecorderInterface … type metricsRecorder … func (m *metricsRecorder) setAllocated(cidr string, allocated int) { … } func (m *metricsRecorder) setAvailable(cidr string, available int) { … } func (m *metricsRecorder) setLatency(cidr string, latency time.Duration) { … } func (m *metricsRecorder) incrementAllocations(cidr, scope string) { … } func (m *metricsRecorder) incrementAllocationErrors(cidr, scope string) { … } type emptyMetricsRecorder … func (*emptyMetricsRecorder) setAllocated(cidr string, allocated int) { … } func (*emptyMetricsRecorder) setAvailable(cidr string, available int) { … } func (*emptyMetricsRecorder) setLatency(cidr string, latency time.Duration) { … } func (*emptyMetricsRecorder) incrementAllocations(cidr, scope string) { … } func (*emptyMetricsRecorder) incrementAllocationErrors(cidr, scope string) { … }