translator

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package translator provides the utilites to convert a HDR histogram to a log linear histogram.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Translator

type Translator interface {
	// Translate histograms to a log linear format, and write the result to a writer.
	Translate(ctx context.Context, family *dto.MetricFamily, out io.Writer) error
	// Histogram returns a copy of the backing histogram definition.
	// Used for testing.
	Histogram() *store.Histogram
}

Translator translate histograms to a log linear format.

func Load added in v0.0.1

func Load(ctx context.Context, store store.Store) ([]Translator, error)

Load is a utility function that loads all the histogram configurations from the store and builds a Translator for each histogram

func New

func New(h *store.Histogram) (Translator, error)

New instantiate a new translator from a histogram definition.

Jump to

Keyboard shortcuts

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