package
3.4.2
Repository: https://github.com/grafana/loki.git
Documentation: pkg.go.dev

# Functions

CanParallelize tests if a subtree is parallelizable.
CloneNode is a helper function to clone a node.
NewASTNodeMapper creates an ASTMapper from a NodeMapper.
NewMultiMapper instaniates an ASTMapper from multiple ASTMappers.
NewShardSummer instantiates an ASTMapper which will fan out sum queries by shard.
NewSubtreeFolder creates a subtreeFolder which can reduce an AST to one embedded query if it contains no embedded queries yet.
ParallelizableFunc ensures that a promql function can be part of a parallel query.
ParseShard will extract the shard information encoded in ShardLabelFmt.
Predicate is a helper which uses parser.Walk under the hood determine if any node in a subtree returns true for a specified function.
ShardFromMatchers extracts a ShardAnnotation and the index it was pulled from in the matcher list.
VectorSquash reduces an AST into a single vector query which can be hijacked by a Queryable impl.

# Constants

EmbeddedQueriesMetricName is a reserved label (metric name) denoting an embedded query.
QueryLabel is a reserved label containing an embedded query.
ShardLabel is a reserved label referencing a cortex shard.
ShardLabelFmt is the fmt of the ShardLabel key.

# Variables

JSONCodec is a Codec that uses JSON representations of EmbeddedQueries structs.
ShardLabelRE matches a value in ShardLabelFmt.

# Structs

ASTNodeMapper is an ASTMapper adapter which uses a NodeMapper internally.
EmbeddedQueries is a wrapper type for encoding queries.
MultiMapper can compose multiple ASTMappers.
ShardAnnotation is a convenience struct which holds data from a parsed shard label.

# Interfaces

ASTMapper is the exported interface for mapping between multiple AST representations.
NodeMapper either maps a single AST node or returns the unaltered node.

# Type aliases

MapperFunc is a function adapter for ASTMapper.
NodeMapperFunc is an adapter for NodeMapper.