Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeAndRegister ¶ added in v1.11.10
func MakeAndRegister(gatherer MultiGatherer, name string) (*prometheus.Registry, error)
Types ¶
type Client ¶ added in v1.11.10
type Client struct {
// contains filtered or unexported fields
}
Client for requesting metrics from a remote Lux Node instance
func (*Client) GetMetrics ¶ added in v1.11.10
GetMetrics returns the metrics from the connected node. The metrics are returned as a map of metric family name to the metric family.
type MultiGatherer ¶ added in v1.11.10
type MultiGatherer interface { prometheus.Gatherer // Register adds the outputs of [gatherer] to the results of future calls to // Gather with the provided [name] added to the metrics. Register(name string, gatherer prometheus.Gatherer) error }
MultiGatherer extends the Gatherer interface by allowing additional gatherers to be registered.
func NewLabelGatherer ¶ added in v1.11.10
func NewLabelGatherer(labelName string) MultiGatherer
NewLabelGatherer returns a new MultiGatherer that merges metrics by adding a new label.
func NewMultiGatherer
deprecated
added in
v1.11.10
func NewMultiGatherer() MultiGatherer
Deprecated: Use NewPrefixGatherer instead.
TODO: Remove once coreth is updated.
func NewPrefixGatherer ¶ added in v1.11.10
func NewPrefixGatherer() MultiGatherer
NewPrefixGatherer returns a new MultiGatherer that merges metrics by adding a prefix to their names.
type OptionalGatherer ¶ added in v1.11.10
type OptionalGatherer interface { prometheus.Gatherer // Register the provided gatherer. If a gatherer was previously registered, // an error will be returned. Register(gatherer prometheus.Gatherer) error }
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 ¶ added in v1.11.10
func NewOptionalGatherer() OptionalGatherer