prometheus

package
v1.16.16 Latest Latest
Warning

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

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

Documentation

Overview

Copyright (C) 2019-2025, Lux Industries, 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

func NewGatherer(registry Registry) *Gatherer

NewGatherer returns a Gatherer using the given registry.

func (*Gatherer) Gather

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

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