catalog

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: Apache-2.0 Imports: 2 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

Overview

Package catalog provides a catalog-based metric transformer that routes metrics to registered specialized transformers.

The catalog transformer orchestrates multiple specialized transformers to provide automatic routing based on metric characteristics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transformer

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

Transformer implements types.MetricTransformer using a catalog of specialized transformers.

Each transformer in the catalog processes all metrics sequentially. Transformers identify which metrics they can handle and transform those while passing through others unchanged.

func NewTransformer

func NewTransformer(transformers ...types.MetricTransformer) *Transformer

NewTransformer creates a new catalog transformer with the provided specialized transformers.

Transformers are applied sequentially - each transformer receives all metrics and decides which ones to transform based on implementation-specific logic (e.g., metric name patterns).

func (*Transformer) Transform

func (t *Transformer) Transform(ctx context.Context, metrics []types.Metric) ([]types.Metric, error)

Transform processes metrics by routing them sequentially through specialized transformers.

Processing flow:

  1. Pass metrics through first transformer
  2. Pass results through second transformer
  3. Continue until all transformers have processed the metrics

This implements the types.MetricTransformer interface.

Jump to

Keyboard shortcuts

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