Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
loki/pkg/util/noop_registry.go

21 lines
506 B

package util
import "github.com/prometheus/client_golang/prometheus"
type NoopRegistry struct{}
var _ prometheus.Registerer = NoopRegistry{}
// MustRegister implements prometheus.Registerer.
func (n NoopRegistry) MustRegister(...prometheus.Collector) {}
// Register implements prometheus.Registerer.
func (n NoopRegistry) Register(prometheus.Collector) error {
return nil
}
// Unregister implements prometheus.Registerer.
func (n NoopRegistry) Unregister(prometheus.Collector) bool {
return true
}