mapper

package
v0.0.0-...-7c1dae6 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapResult

type MapResult struct {
	Name string
	Tags []string
	// contains filtered or unexported fields
}

MapResult represent the outcome of the mapping

type MappingProfile

type MappingProfile struct {
	Name     string
	Prefix   string
	Mappings []*MetricMapping
}

MappingProfile represent a group of mappings

type MappingProfileConfig

type MappingProfileConfig struct {
	Name     string                `mapstructure:"name" json:"name" yaml:"name"`
	Prefix   string                `mapstructure:"prefix" json:"prefix" yaml:"prefix"`
	Mappings []MetricMappingConfig `mapstructure:"mappings" json:"mappings" yaml:"mappings"`
}

MappingProfileConfig represent a group of mappings

type MetricMapper

type MetricMapper struct {
	Profiles []MappingProfile
	// contains filtered or unexported fields
}

MetricMapper contains mappings and cache instance

func NewMetricMapper

func NewMetricMapper(configProfiles []MappingProfileConfig, cacheSize int) (*MetricMapper, error)

NewMetricMapper creates, validates, prepares a new MetricMapper

func (*MetricMapper) Map

func (m *MetricMapper) Map(metricName string) *MapResult

Map returns a MapResult

type MetricMapping

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

MetricMapping represent one mapping rule

type MetricMappingConfig

type MetricMappingConfig struct {
	Match     string            `mapstructure:"match" json:"match" yaml:"match"`
	MatchType string            `mapstructure:"match_type" json:"match_type" yaml:"match_type"`
	Name      string            `mapstructure:"name" json:"name" yaml:"name"`
	Tags      map[string]string `mapstructure:"tags" json:"tags" yaml:"tags"`
}

MetricMapping represent one mapping rule

Jump to

Keyboard shortcuts

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