Skip to content

Commit 9b6f3d1

Browse files
committed
define metrics.Registry as an interface
1 parent a0e9c1d commit 9b6f3d1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pkg/metrics/registry.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ package metrics
1818

1919
import "github.com/prometheus/client_golang/prometheus"
2020

21+
// RegistererGatherer combines both parts of the API of a Prometheus
22+
// registry, both the Registerer and the Gatherer interfaces.
23+
type RegistererGatherer interface {
24+
prometheus.Registerer
25+
prometheus.Gatherer
26+
}
27+
2128
// Registry is a prometheus registry for storing metrics within the
2229
// controller-runtime
23-
var Registry = prometheus.NewRegistry()
30+
var Registry RegistererGatherer = prometheus.NewRegistry()

0 commit comments

Comments
 (0)