prometheus

package
v0.7.4-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: GPL-3.0, LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

(c) 2025 Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gatherer

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

Gatherer implements prometheus.Gatherer interface by gathering all metrics from the given Prometheus registry.

func NewGatherer added in v0.7.4

func NewGatherer(registry Registry) *Gatherer

NewGatherer returns a Gatherer using the given registry.

func (*Gatherer) Gather added in v0.7.4

func (g *Gatherer) Gather() (mfs []*dto.MetricFamily, err error)

Gather gathers metrics from the registry and converts them to a slice of metric families.

type Registry added in v0.7.4

type Registry interface {
	// Call the given function for each registered metric.
	Each(func(string, any))
	// Get the metric by the given name or nil if none is registered.
	Get(string) any
}

Jump to

Keyboard shortcuts

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