dtobuilder

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(
	samples map[string]Sample,
	exemplars map[string]SeriesExemplar,
	metadata map[string]metadata.Metadata,
) []*dto.MetricFamily

Build converts a series of written samples, exemplars, and metadata into a slice of *dto.MetricFamily.

Types

type Sample

type Sample struct {
	Labels         labels.Labels
	Timestamp      int64
	Value          float64
	PrintTimestamp bool
}

Sample represents an individually written sample to a storage.Appender.

type SeriesExemplar

type SeriesExemplar struct {
	// Labels is the labels of the series exposing the exemplar, not the labels
	// on the exemplar itself.
	Labels   labels.Labels
	Exemplar exemplar.Exemplar
}

SeriesExemplar represents an individually written exemplar to a storage.Appender.

Jump to

Keyboard shortcuts

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