Documentation ¶
Overview ¶
Package workqueue embeds metrics exposed by package k8s.io/client-go/util/workqueue.
Packages that make use of workqueue, e.g. runctl, must contribute a NameProvider that maps names of workqueues to subsystem names (i.e. metric name prefixes), so that workqueue metrics appear under the same prefix as other metrics from that package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterNameProvider ¶
func RegisterNameProvider(provider NameProvider)
RegisterNameProvider registers a new NameProvider.
Types ¶
type NameProvider ¶
type NameProvider interface { /* Returns the subsystem name to be used for Prometheus workqueue metrics for the given queue name. If the given queue name is not identified to belong to the name provider's package, return value `ok` must be `false`. */ GetSubsystemFor(queueName string) (subsystem string, ok bool) }
NameProvider is the interface for name providers contributed by packages that make use of k8s.io/client-go/util/workqueue.
type NameProviderFunc ¶
NameProviderFunc is an adapter that allows to use functions with the right signature as NameProvider.
func (NameProviderFunc) GetSubsystemFor ¶
func (f NameProviderFunc) GetSubsystemFor(queueName string) (string, bool)
GetSubsystemFor implements interface NameProvider.