metrics

package
v3.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MetricsToMap

func MetricsToMap(metrics []*Metric) map[string]float64

MetricsToMap converts metrics to map.

Types

type Metric

type Metric struct {
	// Name is the name of the metric.
	Name string
	// Value is the value of the metric.
	Value float64
	// Labels is the tags of the metric.
	Labels map[string]string
	// Description is the description of the metric.
	Description string
	// Purge is the purge of the metric.
	Purge bool `default:"false"`
	// PurgeLabels is the purge labels of the metric.
	PurgeLabels []string
	// PurgeAfter is the purge after of the metric.
	PurgeAfter time.Duration
}

Metric represents a metric.

Jump to

Keyboard shortcuts

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