Run NodesReferenceService

metrics

Package metrics

import "github.com/luxfi/node/service/metrics"

Functions

MakeAndRegister

func MakeAndRegister(gatherer MultiGatherer, name string) (metric.Registry, error)

Types

Client

Client for requesting metrics from a remote Lux Node instance

func NewClient(uri string) *Client
func (c *Client) GetMetrics(ctx context.Context) (map[string]*metric.MetricFamily, error)

MultiGatherer

MultiGatherer extends the Gatherer interface by allowing additional gatherers to be registered.

func NewLabelGatherer(labelName string) MultiGatherer
func NewMultiGatherer() MultiGatherer
func NewPrefixGatherer() MultiGatherer

OptionalGatherer

OptionalGatherer extends the Gatherer interface by allowing the optional registration of a single gatherer. If no gatherer is registered, Gather will return no metrics and no error. If a gatherer is registered, Gather will return the results of calling Gather on the provided gatherer.

func NewOptionalGatherer() OptionalGatherer