metric

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: 11 Imported by: 0

Documentation

Overview

Package metric provides utilities to rewrite metrics based on a set of translators

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient added in v0.0.1

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient submits requests to an HTTP server.

type Writer added in v0.0.1

type Writer struct {
	// contains filtered or unexported fields
}

Writer copies metrics from a source to destination, applying a set of translators

func NewWriter added in v0.0.1

func NewWriter(
	URL string, tlsConfig *tls.Config, translators []translator.Translator,
) (*Writer, error)

NewWriter builds a new writer that fetches metrics from the named location, using the named translators.

func (*Writer) Copy added in v0.0.1

func (w *Writer) Copy(ctx context.Context, out io.Writer) error

Copy reads the metrics from source, applies the translators and outputs the resulting metrics to the named writer.

func (*Writer) GetTranslators added in v0.0.1

func (w *Writer) GetTranslators() []translator.Translator

GetTranslators returns the translators.

func (*Writer) SetTranslators added in v0.0.1

func (w *Writer) SetTranslators(translators []translator.Translator)

SetTranslators replaces the translators with new ones.

Jump to

Keyboard shortcuts

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