metrics, p2p: add ephemeral registry (#18067)

* metrics, p2p: add ephemeral registry

* metrics: fix linter issue
This commit is contained in:
Kurkó Mihály
2018-11-09 11:20:51 +02:00
committed by Martin Holst Swende
parent 870efeef01
commit f574c4e74b
2 changed files with 6 additions and 3 deletions

View File

@ -311,7 +311,10 @@ func (r *PrefixedRegistry) UnregisterAll() {
r.underlying.UnregisterAll()
}
var DefaultRegistry Registry = NewRegistry()
var (
DefaultRegistry = NewRegistry()
EphemeralRegistry = NewRegistry()
)
// Call the given function for each registered metric.
func Each(f func(string, interface{})) {