rule

package
v0.0.0-...-fad4f1b Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterRule

type CounterRule struct {
	Config           CounterRuleConfig
	NameMatcherRegex *regexp.Regexp
}

func (*CounterRule) IsGenerateExpr

func (r *CounterRule) IsGenerateExpr() bool

func (*CounterRule) Replace

func (r *CounterRule) Replace(expr parser.Expr) (parser.Expr, bool)

type CounterRuleConfig

type CounterRuleConfig struct {
	NameMatcher string `yaml:"namematcher"`
	Range       string `yaml:"range"`
}

type LabelJoinRule

type LabelJoinRule struct {
	Config           LabelJoinRuleConfig
	NameMatcherRegex *regexp.Regexp
}

func (*LabelJoinRule) IsGenerateExpr

func (r *LabelJoinRule) IsGenerateExpr() bool

func (*LabelJoinRule) Replace

func (r *LabelJoinRule) Replace(expr parser.Expr) (parser.Expr, bool)

type LabelJoinRuleConfig

type LabelJoinRuleConfig struct {
	NameMatcher    string   `yaml:"namematcher"`
	LabelProvider  string   `yaml:"label_provider"`
	TargetLabels   []string `yaml:"target_labels"`
	IgnoringLabels []string `yaml:"ignoring_labels"`
}

type NameMapRule

type NameMapRule struct {
	Config NameMapRuleConfig
}

func (*NameMapRule) IsGenerateExpr

func (r *NameMapRule) IsGenerateExpr() bool

func (*NameMapRule) Replace

func (r *NameMapRule) Replace(expr parser.Expr) (parser.Expr, bool)

type NameMapRuleConfig

type NameMapRuleConfig struct {
	NameMap map[string]string `yaml:"namemap"`
}

type RelabelRule

type RelabelRule struct {
	Config RelabelRuleConfig
}

func (*RelabelRule) IsGenerateExpr

func (r *RelabelRule) IsGenerateExpr() bool

func (*RelabelRule) Replace

func (r *RelabelRule) Replace(expr parser.Expr) (parser.Expr, bool)

type RelabelRuleConfig

type RelabelRuleConfig struct {
	Relabel []*relabel.Config `yaml:"relabel"`
}

type Rule

type Rule interface {
	Replace(expr parser.Expr) (parser.Expr, bool)
	IsGenerateExpr() bool
}

type RuleConfig

type RuleConfig struct {
	CounterConfig   *CounterRuleConfig   `yaml:"counter_rule_config,omitempty"`
	LabelJoinConfig *LabelJoinRuleConfig `yaml:"labeljoin_rule_config,omitempty"`
	NameMapConfig   *NameMapRuleConfig   `yaml:"namemap_rule_config,omitempty"`
	RelabelConfig   *RelabelRuleConfig   `yaml:"relabel_rule_config,omitempty"`
}

Jump to

Keyboard shortcuts

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