Skip to content

Commit

Permalink
define metrics.Registry as an interface
Browse files Browse the repository at this point in the history
  • Loading branch information
xrstf committed Dec 6, 2019
1 parent a0e9c1d commit 9b6f3d1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/metrics/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ package metrics

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

// RegistererGatherer combines both parts of the API of a Prometheus
// registry, both the Registerer and the Gatherer interfaces.
type RegistererGatherer interface {
prometheus.Registerer
prometheus.Gatherer
}

// Registry is a prometheus registry for storing metrics within the
// controller-runtime
var Registry = prometheus.NewRegistry()
var Registry RegistererGatherer = prometheus.NewRegistry()

0 comments on commit 9b6f3d1

Please sign in to comment.