prometheus

package
v1.13.4-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

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 the prometheus.Gatherer interface by gathering all metrics from a Registry.

func NewGatherer

func NewGatherer(registry Registry) *Gatherer

NewGatherer returns a Gatherer using the given registry.

func (*Gatherer) Gather

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

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

type Registry

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

Jump to

Keyboard shortcuts

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