metrics

package
v0.3.10-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeaconMetricsCollector

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

BeaconMetricsCollector is a prometheus Collector for beacon metrics.

func NewBeaconMetricsCollector

func NewBeaconMetricsCollector(cb GatherCB, logger log.Logger) *BeaconMetricsCollector

NewBeaconMetricsCollector creates a prometheus Collector for beacons.

func (*BeaconMetricsCollector) Collect

func (bmc *BeaconMetricsCollector) Collect(ch chan<- prometheus.Metric)

Collect implements Collector.

func (*BeaconMetricsCollector) Describe

func (bmc *BeaconMetricsCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements Collector.

func (*BeaconMetricsCollector) Start

func (bmc *BeaconMetricsCollector) Start(registry *prometheus.Registry)

Start registers the Collector with specified prometheus registry and starts the metrics collection.

func (*BeaconMetricsCollector) Stop

func (bmc *BeaconMetricsCollector) Stop()

Stop unregisters the Collector with specified prometheus registry and stops the metrics collection.

type BeaconStats

type BeaconStats struct {
	Epoch      types.EpochID
	Beacon     string
	Weight     fixed.Fixed
	WeightUnit int
}

BeaconStats hold metadata for each beacon value.

type GatherCB

type GatherCB func() ([]*BeaconStats, *BeaconStats)

GatherCB returns stats for the observed and calculated beacons.

Jump to

Keyboard shortcuts

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