# Functions
AddFilterExpr adds a filter expression to a logselector expression.
AssertExpressions function removes FastRegexMatchers from all Regexp matchers to allow simple objects comparison.
AssertMatchers function removes FastRegexMatchers from all Regexp matchers to allow simple objects comparison.
IsLogicalBinOp tests whether an operation is a logical/set binary operation.
MergeBinOp performs `op` on `left` and `right` arguments and return the `promql.Sample` value.
ParseExpr parses a string and returns an Expr.
ParseLabels parses labels from a string using logql parser.
ParseLogSelector parses a log selector expression `{app="foo"} |= "filter"`.
ParseMatchers parses a string and returns labels matchers, if the expression contains anything else it will return an error.
ParseSampleExpr parses a string and returns the sampleExpr.
RemoveFastRegexMatchers iterates over the matchers and recreates the matchers without *FastRegexMatcher, because Prometheus labels matcher sets a new instance each time it's created, and it prevents simple object assertions.
TokenString returns a printable string for a token or Unicode character.
# Constants
Field names.
Field names.
Field names.
Field names.
Field names.
The result of Scan is one of these tokens or a Unicode character.
The result of Scan is one of these tokens or a Unicode character.
Field names.
Field names.
The result of Scan is one of these tokens or a Unicode character.
The result of Scan is one of these tokens or a Unicode character.
Predefined mode bits to control recognition of tokens.
GoWhitespace is the default value for the Scanner's Whitespace field.
Field names.
Field names.
The result of Scan is one of these tokens or a Unicode character.
Field names.
Field names.
Field names.
The result of Scan is one of these tokens or a Unicode character.
Field names.
Field names.
Field names.
Field names.
Field names.
Field names.
Field names.
Field names.
Field names.
Field names.
Field names.
Field names.
Field names.
Field names.
conversion Op.
drop labels.
function filters.
keep labels.
parsers.
range vector ops.
internal expressions not represented in LogQL.
parser flags.
Field names.
binops - arithmetic.
probabilistic aggregations.
binops - comparison.
binops - logical/set.
vector ops.
vector.
Field names.
Field names.
Field names.
Field names.
Field names.
Field names.
The result of Scan is one of these tokens or a Unicode character.
Field names.
Field names.
Field names.
Field names.
Predefined mode bits to control recognition of tokens.
Predefined mode bits to control recognition of tokens.
includes Ints and hexadecimal floats.
Predefined mode bits to control recognition of tokens.
Predefined mode bits to control recognition of tokens.
Predefined mode bits to control recognition of tokens.
Predefined mode bits to control recognition of tokens.
if set with ScanComments, comments become white space.
Field names.
The result of Scan is one of these tokens or a Unicode character.
Field names.
Field names.
Field names.
Field names.
Field names.
Field names.
Field names.
Field names.
# Variables
MaxCharsPerLine is used to qualify whether some LogQL expressions are worth `splitting` into new lines.
# Structs
Grouping struct represents the grouping by/without label(s) for vector aggregators and range vector aggregators.
Position is a value that represents a source position.
RangeAggregationExpr not all range vector aggregation expressions support grouping by/without label(s), therefore the Grouping struct can be nil.
A Scanner implements reading of Unicode characters and tokens from an io.Reader.
VectorAggregationExpr all vector aggregation expressions support grouping by/without label(s), therefore the Grouping struct can never be nil.
VectorMatching describes how elements from two Vectors in a binary operation are supposed to be matched.
# Interfaces
Expr is the root expression which can be a SampleExpr or LogSelectorExpr
sumtype:decl.
LogSelectorExpr is a LogQL expression filtering and returning logs.
SampleExpr is a LogQL expression filtering logs and returning metric samples.
StageExpr is an expression defining a single step into a log pipeline
sumtype:decl.
# Type aliases
MultiStageExpr is multiple stages which implements a LogSelectorExpr.
Type alias for backward compatibility.
Type alias for backward compatibility.
VectorMatchCardinality describes the cardinality relationship of two Vectors in a binary operation.