Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunDiscovery ¶
func RunDiscovery(ctx context.Context, d Discoverer, f func([]Target))
RunDiscovery is a utility for consuming and forwarding target groups from a discoverer. It will handle collating targets (and clearing), as well as time based throttling of updates. f should be a function that updates the component's exports, most likely calling `opts.OnStateChange()`.
Types ¶
type Discoverer ¶
type Discoverer discovery.Discoverer
Discoverer is an alias for Prometheus' Discoverer interface, so users of this package don't need to import github.com/prometheus/prometheus/discover as well.
Click to show internal directories.
Click to hide internal directories.