discovery

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component added in v0.28.0

type Component struct {
	// contains filtered or unexported fields
}

Component is a reusable component for any discovery implementation. it will handle dynamic updates and exporting targets appropriately for a scrape implementation.

func New added in v0.28.0

func New(o component.Options, args component.Arguments, creator Creator) (*Component, error)

New creates a discovery component given arguments and a concrete Discovery implementation function.

func (*Component) Run added in v0.28.0

func (c *Component) Run(ctx context.Context) error

Run implements component.Component.

func (*Component) Update added in v0.28.0

func (c *Component) Update(args component.Arguments) error

Update implements component.Compnoent.

type Creator added in v0.28.0

type Creator func(component.Arguments) (Discoverer, error)

Creator is a function provided by an implementation to create a concrete Discoverer instance.

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 Exports added in v0.28.0

type Exports struct {
	Targets []Target `river:"targets,attr"`
}

Exports holds values which are exported by all discovery components.

type Target

type Target map[string]string

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

func (Target) Labels added in v0.31.0

func (t Target) Labels() labels.Labels

Labels converts Target into a set of sorted labels.

Directories

Path Synopsis
Package docker implements the discovery.docker component.
Package docker implements the discovery.docker component.
Package kubernetes implements a discovery.kubernetes component.
Package kubernetes implements a discovery.kubernetes component.

Jump to

Keyboard shortcuts

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