discovery

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

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.

type Target

type Target map[string]string

Target refers to a singular discovered endpoint found by a discovery component.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳