climetrics

package
v1.8.2-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 33 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingConfig   = errors.New("prometheus section missing, can't show metrics")
	ErrMetricsDisabled = errors.New("prometheus is not enabled, can't show metrics")
)
View Source
var ErrNilTable = errors.New("nil table")

ErrNilTable means a nil pointer was passed instead of a table instance. This is a programming error.

Functions

func New

func New(cfg csconfig.Getter) *cliMetrics

func NewMetricStore

func NewMetricStore() metricStore

Types

type MetricPoint added in v1.7.4

type MetricPoint struct {
	Labels map[string]string
	Value  float64
	Type   dto.MetricType
	Name   string
}

func ScrapeMetrics added in v1.7.4

func ScrapeMetrics(ctx context.Context, url string) ([]MetricPoint, error)

ScrapeMetrics retrieves and parses Prometheus metrics from the given URL using the provided context for cancellation and timeout.

Jump to

Keyboard shortcuts

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