logqlpattern

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package logqlpattern contains parser for LogQL `pattern` stage pattern.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Match

func Match(p Pattern, input string, match func(label logql.Label, value string)) bool

Match matches given pattern against input string.

Types

type Part

type Part struct {
	Type  PartType
	Value string
}

Part is a pattern part.

type PartType

type PartType uint8

PartType defines type of Part.

const (
	Capture PartType = iota + 1
	Literal
)

type Pattern

type Pattern struct {
	Parts []Part
}

Pattern is a parsed pattern.

func Parse

func Parse(input string) (p Pattern, _ error)

Parse parses pattern.

Jump to

Keyboard shortcuts

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