Versions in this module Expand all Collapse all v2 v2.4.3 Feb 9, 2022 Changes in this version + const EmbeddedQueriesMetricName + const QueryLabel + const ShardLabel + const ShardLabelFmt + var JSONCodec jsonCodec + var ShardLabelRE = regexp.MustCompile("^[0-9]+_of_[0-9]+$") + func CanParallelize(node parser.Node) bool + func CloneNode(node parser.Node) (parser.Node, error) + func ParallelizableFunc(f parser.Function) bool + func Predicate(node parser.Node, fn predicate) (bool, error) + func VectorSquasher(nodes ...parser.Node) (parser.Expr, error) + type ASTMapper interface + Map func(node parser.Node) (parser.Node, error) + func NewShardSummer(shards int, squasher squasher, shardedQueries prometheus.Counter) (ASTMapper, error) + func NewSubtreeFolder() ASTMapper + type ASTNodeMapper struct + func NewASTNodeMapper(mapper NodeMapper) ASTNodeMapper + func (nm ASTNodeMapper) Map(node parser.Node) (parser.Node, error) + type EmbeddedQueries struct + Concat []string + type MapperFunc func(node parser.Node) (parser.Node, error) + func (fn MapperFunc) Map(node parser.Node) (parser.Node, error) + type MultiMapper struct + func NewMultiMapper(xs ...ASTMapper) *MultiMapper + func (m *MultiMapper) Map(node parser.Node) (parser.Node, error) + func (m *MultiMapper) Register(xs ...ASTMapper) + type NodeMapper interface + MapNode func(node parser.Node) (mapped parser.Node, finished bool, err error) + type NodeMapperFunc func(node parser.Node) (parser.Node, bool, error) + func (f NodeMapperFunc) MapNode(node parser.Node) (parser.Node, bool, error) + type ShardAnnotation struct + Of int + Shard int + func ParseShard(input string) (parsed ShardAnnotation, err error) + func ShardFromMatchers(matchers []*labels.Matcher) (shard *ShardAnnotation, idx int, err error) + func (shard ShardAnnotation) Label() labels.Label + func (shard ShardAnnotation) String() string