Versions in this module Expand all Collapse all v1 v1.6.3 Jan 15, 2024 Changes in this version + const ConvertBytes + const ConvertDuration + const ConvertFloat + var NoopLabelFilter = noopLabelFilter + var TrueFilter = trueFilter + func IsNoopPipeline(p Pipeline) bool + type BaseLabelsBuilder struct + func NewBaseLabelsBuilder() *BaseLabelsBuilder + func NewBaseLabelsBuilderWithGrouping(groups []string, parserKeyHints ParserHint, without, noLabels bool) *BaseLabelsBuilder + func (b *BaseLabelsBuilder) ForLabels(lbs labels.Labels, hash uint64) *LabelsBuilder + func (b *BaseLabelsBuilder) ParserLabelHints() ParserHint + func (h BaseLabelsBuilder) Hash(lbs labels.Labels) uint64 + type BinaryLabelFilter struct + Left LabelFilterer + Right LabelFilterer + func NewAndLabelFilter(left LabelFilterer, right LabelFilterer) *BinaryLabelFilter + func NewOrLabelFilter(left LabelFilterer, right LabelFilterer) *BinaryLabelFilter + func (b *BinaryLabelFilter) Process(line []byte, lbs *LabelsBuilder) ([]byte, bool) + func (b *BinaryLabelFilter) RequiredLabelNames() []string + func (b *BinaryLabelFilter) String() string + type BytesLabelFilter struct + Name string + Type LabelFilterType + Value uint64 + func NewBytesLabelFilter(t LabelFilterType, name string, b uint64) *BytesLabelFilter + func (d *BytesLabelFilter) Process(line []byte, lbs *LabelsBuilder) ([]byte, bool) + func (d *BytesLabelFilter) RequiredLabelNames() []string + func (d *BytesLabelFilter) String() string + type DurationLabelFilter struct + Name string + Type LabelFilterType + Value time.Duration + func NewDurationLabelFilter(t LabelFilterType, name string, d time.Duration) *DurationLabelFilter + func (d *DurationLabelFilter) Process(line []byte, lbs *LabelsBuilder) ([]byte, bool) + func (d *DurationLabelFilter) RequiredLabelNames() []string + func (d *DurationLabelFilter) String() string + type Filterer interface + Filter func(line []byte) bool + ToStage func() Stage + func NewAndFilter(left Filterer, right Filterer) Filterer + func NewFilter(match string, mt labels.MatchType) (Filterer, error) + type FiltererFunc func(line []byte) bool + func (f FiltererFunc) Filter(line []byte) bool + type JSONExpression struct + Expression string + Identifier string + func NewJSONExpr(identifier, expression string) JSONExpression + type JSONExpressionParser struct + func NewJSONExpressionParser(expressions []JSONExpression) (*JSONExpressionParser, error) + func (j *JSONExpressionParser) Process(line []byte, lbs *LabelsBuilder) ([]byte, bool) + func (j *JSONExpressionParser) RequiredLabelNames() []string + type JSONParser struct + func NewJSONParser() *JSONParser + func (j *JSONParser) Process(line []byte, lbs *LabelsBuilder) ([]byte, bool) + func (j *JSONParser) RequiredLabelNames() []string + type LabelFilterType int + const LabelFilterEqual + const LabelFilterGreaterThan + const LabelFilterGreaterThanOrEqual + const LabelFilterLesserThan + const LabelFilterLesserThanOrEqual + const LabelFilterNotEqual + func (f LabelFilterType) String() string + type LabelFilterer interface + func ReduceAndLabelFilter(filters []LabelFilterer) LabelFilterer + type LabelFmt struct + Name string + Rename bool + Value string + func NewRenameLabelFmt(dst, target string) LabelFmt + func NewTemplateLabelFmt(dst, template string) LabelFmt + type LabelsBuilder struct + func (b *LabelsBuilder) BaseHas(key string) bool + func (b *LabelsBuilder) Del(ns ...string) *LabelsBuilder + func (b *LabelsBuilder) Get(key string) (string, bool) + func (b *LabelsBuilder) GetErr() string + func (b *LabelsBuilder) GroupedLabels() LabelsResult + func (b *LabelsBuilder) HasErr() bool + func (b *LabelsBuilder) Labels() labels.Labels + func (b *LabelsBuilder) LabelsResult() LabelsResult + func (b *LabelsBuilder) Reset() + func (b *LabelsBuilder) Set(n, v string) *LabelsBuilder + func (b *LabelsBuilder) SetErr(err string) *LabelsBuilder + func (h LabelsBuilder) Hash(lbs labels.Labels) uint64 + type LabelsFormatter struct + func NewLabelsFormatter(fmts []LabelFmt) (*LabelsFormatter, error) + func (lf *LabelsFormatter) Process(l []byte, lbs *LabelsBuilder) ([]byte, bool) + func (lf *LabelsFormatter) RequiredLabelNames() []string + type LabelsResult interface + Hash func() uint64 + Labels func() labels.Labels + String func() string + func NewLabelsResult(lbs labels.Labels, hash uint64) LabelsResult + type LineExtractor func([]byte) float64 + var BytesExtractor LineExtractor = func(line []byte) float64 { ... } + var CountExtractor LineExtractor = func(line []byte) float64 { ... } + type LineFormatter struct + func NewFormatter(tmpl string) (*LineFormatter, error) + func (lf *LineFormatter) Process(line []byte, lbs *LabelsBuilder) ([]byte, bool) + func (lf *LineFormatter) RequiredLabelNames() []string + type LogfmtParser struct + func NewLogfmtParser() *LogfmtParser + func (l *LogfmtParser) Process(line []byte, lbs *LabelsBuilder) ([]byte, bool) + func (l *LogfmtParser) RequiredLabelNames() []string + type NumericLabelFilter struct + Name string + Type LabelFilterType + Value float64 + func NewNumericLabelFilter(t LabelFilterType, name string, v float64) *NumericLabelFilter + func (n *NumericLabelFilter) Process(line []byte, lbs *LabelsBuilder) ([]byte, bool) + func (n *NumericLabelFilter) RequiredLabelNames() []string + func (n *NumericLabelFilter) String() string + type ParserHint interface + NoLabels func() bool + ShouldExtract func(key string) bool + ShouldExtractPrefix func(prefix string) bool + type Pipeline interface + ForStream func(labels labels.Labels) StreamPipeline + func NewNoopPipeline() Pipeline + func NewPipeline(stages []Stage) Pipeline + type RegexpParser struct + func NewRegexpParser(re string) (*RegexpParser, error) + func (r *RegexpParser) Process(line []byte, lbs *LabelsBuilder) ([]byte, bool) + func (r *RegexpParser) RequiredLabelNames() []string + type SampleExtractor interface + ForStream func(labels labels.Labels) StreamSampleExtractor + func LabelExtractorWithStages(labelName, conversion string, groups []string, without, noLabels bool, ...) (SampleExtractor, error) + func NewLineSampleExtractor(ex LineExtractor, stages []Stage, groups []string, without, noLabels bool) (SampleExtractor, error) + type Stage interface + Process func(line []byte, lbs *LabelsBuilder) ([]byte, bool) + RequiredLabelNames func() []string + var NoopStage Stage = &noopStage{} + func ReduceStages(stages []Stage) Stage + type StageFunc struct + func (fn StageFunc) Process(line []byte, lbs *LabelsBuilder) ([]byte, bool) + func (fn StageFunc) RequiredLabelNames() []string + type StreamPipeline interface + Process func(line []byte) (resultLine []byte, resultLabels LabelsResult, skip bool) + ProcessString func(line string) (resultLine string, resultLabels LabelsResult, skip bool) + type StreamSampleExtractor interface + Process func(line []byte) (float64, LabelsResult, bool) + ProcessString func(line string) (float64, LabelsResult, bool) + type StringLabelFilter struct + func NewStringLabelFilter(m *labels.Matcher) *StringLabelFilter + func (s *StringLabelFilter) Process(line []byte, lbs *LabelsBuilder) ([]byte, bool) + func (s *StringLabelFilter) RequiredLabelNames() []string + type UnpackParser struct + func NewUnpackParser() *UnpackParser + func (UnpackParser) RequiredLabelNames() []string + func (u *UnpackParser) Process(line []byte, lbs *LabelsBuilder) ([]byte, bool)