Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var MaxUpdateFrequency = 5 * time.Second
MaxUpdateFrequency is the minimum time to wait between updating targets. Prometheus uses a static threshold. Do not recommend changing this, except for tests.
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
New creates a discovery component given arguments and a concrete Discovery implementation function.
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 DistributedTargets ¶ added in v0.33.0
type DistributedTargets struct {
// contains filtered or unexported fields
}
DistributedTargets uses the node's Lookup method to distribute discovery targets when a Flow component runs in a cluster.
func NewDistributedTargets ¶ added in v0.33.0
func NewDistributedTargets(e bool, n cluster.Cluster, t []Target) DistributedTargets
NewDistributedTargets creates the abstraction that allows components to dynamically shard targets between components.
func (*DistributedTargets) Get ¶ added in v0.33.0
func (t *DistributedTargets) Get() []Target
Get distributes discovery targets a clustered environment.
If a cluster size is 1, then all targets will be returned.
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.
Directories ¶
Path | Synopsis |
---|---|
Package docker implements the discovery.docker component.
|
Package docker implements the discovery.docker component. |
Package gce implements the discovery.gce component.
|
Package gce implements the discovery.gce component. |
Package kubelet implements a discovery.kubelet component.
|
Package kubelet implements a discovery.kubelet component. |
Package kubernetes implements a discovery.kubernetes component.
|
Package kubernetes implements a discovery.kubernetes component. |