mapper

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType

type ActionType string
const (
	ActionTypeMap     ActionType = "map"
	ActionTypeDrop    ActionType = "drop"
	ActionTypeDefault ActionType = ""
)

func (*ActionType) UnmarshalYAML

func (t *ActionType) UnmarshalYAML(unmarshal func(interface{}) error) error

type MatchType

type MatchType string
const (
	MatchTypeGlob    MatchType = "glob"
	MatchTypeRegex   MatchType = "regex"
	MatchTypeDefault MatchType = ""
)

func (*MatchType) UnmarshalYAML

func (t *MatchType) UnmarshalYAML(unmarshal func(interface{}) error) error

type MetricMapper

type MetricMapper struct {
	Defaults mapperConfigDefaults `yaml:"defaults"`
	Mappings []MetricMapping      `yaml:"mappings"`
	FSM      *fsm.FSM

	MappingsCount prometheus.Gauge
	// contains filtered or unexported fields
}

func (*MetricMapper) GetMapping

func (m *MetricMapper) GetMapping(statsdMetric string, statsdMetricType MetricType) (*MetricMapping, prometheus.Labels, bool)

func (*MetricMapper) InitFromFile

func (m *MetricMapper) InitFromFile(fileName string) error

func (*MetricMapper) InitFromYAMLString

func (m *MetricMapper) InitFromYAMLString(fileContents string) error

type MetricMapping

type MetricMapping struct {
	Match string `yaml:"match"`
	Name  string `yaml:"name"`

	Labels prometheus.Labels `yaml:"labels"`

	TimerType       TimerType         `yaml:"timer_type"`
	Buckets         []float64         `yaml:"buckets"`
	Quantiles       []metricObjective `yaml:"quantiles"`
	MatchType       MatchType         `yaml:"match_type"`
	HelpText        string            `yaml:"help"`
	Action          ActionType        `yaml:"action"`
	MatchMetricType MetricType        `yaml:"match_metric_type"`
	// contains filtered or unexported fields
}

type MetricType

type MetricType string
const (
	MetricTypeCounter MetricType = "counter"
	MetricTypeGauge   MetricType = "gauge"
	MetricTypeTimer   MetricType = "timer"
)

func (*MetricType) UnmarshalYAML

func (m *MetricType) UnmarshalYAML(unmarshal func(interface{}) error) error

type TimerType

type TimerType string
const (
	TimerTypeHistogram TimerType = "histogram"
	TimerTypeSummary   TimerType = "summary"
	TimerTypeDefault   TimerType = ""
)

func (*TimerType) UnmarshalYAML

func (t *TimerType) UnmarshalYAML(unmarshal func(interface{}) error) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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