Skip to content

Commit

Permalink
Merge pull request #713 from xrstf/prometheus-registry-interface
Browse files Browse the repository at this point in the history
✨ Define metrics.Registry as an interface
  • Loading branch information
k8s-ci-robot authored Dec 10, 2019
2 parents 55ea949 + 9b6f3d1 commit 158b897
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 158b897

Please sign in to comment.