watcher

package
v0.0.0-...-18a36a0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AggregateValidatorsByLabel

func AggregateValidatorsByLabel(validationKeys map[string][]string) map[string]int

AggregateValidatorsByLabel aggregates the number of validators per label and returns a map with label and count.

Types

type Watcher

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

Watcher watches a list of validation keys periodically.

func NewWatcher

func NewWatcher(cfg *core.Config, reg prometheus.Registerer) (*Watcher, error)

NewWatcher creates a new watcher for validation keys.

func (*Watcher) Watch

func (w *Watcher) Watch() error

Watch continuously fetches statistics about validation keys on rated.network.

type WatcherMetrics

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

Prometheus metrics exposed by the watcher.

func NewWatcherMetrics

func NewWatcherMetrics(reg prometheus.Registerer) *WatcherMetrics

NewWatcherMetrics creates prometheus metrics for the watcher.

Jump to

Keyboard shortcuts

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