merger

package
v0.0.0-crc0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package merger provides interfaces and implementations for aggregating query responses from multiple storage backends (Loki, Prometheus).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MatrixMerger

type MatrixMerger struct {
	// contains filtered or unexported fields
}

MatrixMerger aggregates multiple Matrix results from Loki or Prometheus queries.

func NewMatrixMerger

func NewMatrixMerger(reqLimit int) *MatrixMerger

NewMatrixMerger creates a new MatrixMerger with the given per-query result limit.

func (*MatrixMerger) Add

Add merges a new QueryResponseData (Matrix result) into the aggregated result.

func (*MatrixMerger) Get

Get returns the final aggregated AggregatedQueryResponse.

type Merger

type Merger interface {
	Add(from model.QueryResponseData) (model.ResultValue, error)
	Get() *model.AggregatedQueryResponse
}

Merger aggregates multiple storage query responses into a single result.

Jump to

Keyboard shortcuts

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