Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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
Click to show internal directories.
Click to hide internal directories.