Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareYAML ¶ added in v0.14.0
func CompareYAML(a, b interface{}) bool
CompareYAML marshals a and b to YAML and ensures that their contents are equal. If either Marshal fails, CompareYAML returns false.
func DefaultConfigFromFlags ¶
func DefaultConfigFromFlags(cfg interface{}) interface{}
DefaultConfigFromFlags will load default values into cfg by retrieving default values that are registered as flags.
cfg must implement either PrefixedConfigFlags or ConfigFlags.
func GoKitLogger ¶ added in v0.14.0
GoKitLogger creates a logging.Interface from a log.Logger.
func TestLogger ¶ added in v0.14.0
TestLogger generates a logger for a test.
Types ¶
type ConfigFlags ¶
ConfigFlags is an interface that will register flags that can control some object.
type Logger ¶ added in v0.14.0
type Logger struct {
// contains filtered or unexported fields
}
Logger implements Go Kit's log.Logger interface. It supports being dynamically updated at runtime.
func (*Logger) ApplyConfig ¶ added in v0.14.0
ApplyConfig applies configuration changes to the logger.
type PrefixedConfigFlags ¶
PrefixedConfigFlags is an interface that, given a prefix for flags and a flagset, will register flags that can control some object.
type Unregisterer ¶ added in v0.13.0
type Unregisterer struct {
// contains filtered or unexported fields
}
Unregisterer is a Prometheus Registerer that can unregister all collectors passed to it.
func WrapWithUnregisterer ¶ added in v0.13.0
func WrapWithUnregisterer(reg prometheus.Registerer) *Unregisterer
WrapWithUnregisterer wraps a prometheus Registerer with capabilities to unregister all collectors.
func (*Unregisterer) MustRegister ¶ added in v0.13.0
func (u *Unregisterer) MustRegister(cs ...prometheus.Collector)
MustRegister implements prometheus.Registerer.
func (*Unregisterer) Register ¶ added in v0.13.0
func (u *Unregisterer) Register(c prometheus.Collector) error
Register implements prometheus.Registerer.
func (*Unregisterer) Unregister ¶ added in v0.13.0
func (u *Unregisterer) Unregister(c prometheus.Collector) bool
Unregister implements prometheus.Registerer.
func (*Unregisterer) UnregisterAll ¶ added in v0.13.0
func (u *Unregisterer) UnregisterAll() bool
UnregisterAll unregisters all collectors that were registered through the Reigsterer.