File: register.go

package info (click to toggle)
golang-github-docker-go-metrics 0.0~git20180209.399ea8c-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, experimental, sid
  • size: 152 kB
  • sloc: makefile: 2
file content (15 lines) | stat: -rw-r--r-- 388 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package metrics

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

// Register adds all the metrics in the provided namespace to the global
// metrics registry
func Register(n *Namespace) {
	prometheus.MustRegister(n)
}

// Deregister removes all the metrics in the provided namespace from the
// global metrics registry
func Deregister(n *Namespace) {
	prometheus.Unregister(n)
}