Version: v0.21.2 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 0



Package workqueue embeds metrics exposed by package

Packages that make use of workqueue, e.g. runctl or tenantctl, 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.



This section is empty.


This section is empty.


func RegisterNameProvider

func RegisterNameProvider(provider NameProvider)

RegisterNameProvider registers a new NameProvider.


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

type NameProviderFunc

type NameProviderFunc func(queueName string) (subsystem string, ok bool)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL