loki

package
v1.12.0-community Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package loki provides functionalities for interacting with Loki

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFunctionWithQuantile

func GetFunctionWithQuantile(metricFunction constants.MetricFunction) (string, string)

GetFunctionWithQuantile maps a MetricFunction to its LogQL function name and optional quantile value.

Types

type FlowQueryBuilder added in v0.1.2

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

FlowQueryBuilder stores a state to build a LogQL query

func NewFlowQueryBuilder added in v0.1.2

func NewFlowQueryBuilder(cfg *config.Loki, start, end, limit string,
	recordType constants.RecordType, packetLoss constants.PacketLoss) *FlowQueryBuilder

func NewFlowQueryBuilderWithDefaults added in v0.1.2

func NewFlowQueryBuilderWithDefaults(cfg *config.Loki) *FlowQueryBuilder

func (*FlowQueryBuilder) Build added in v0.1.2

func (q *FlowQueryBuilder) Build() string

func (*FlowQueryBuilder) Filters added in v0.1.2

func (q *FlowQueryBuilder) Filters(queryFilters filters.SingleQuery) error

type StreamMerger added in v0.1.2

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

func NewStreamMerger added in v0.1.2

func NewStreamMerger(reqLimit int) *StreamMerger

func (*StreamMerger) Add added in v0.1.3

func (*StreamMerger) Get added in v0.1.3

type TopologyQueryBuilder added in v0.1.2

type TopologyQueryBuilder struct {
	*FlowQueryBuilder
	// contains filtered or unexported fields
}

TopologyQueryBuilder builds LogQL metric queries for topology views.

func NewTopologyQuery added in v0.1.2

func NewTopologyQuery(cfg *config.Loki, kl map[string][]string, in *queryparams.TopologyInput) (*TopologyQueryBuilder, error)

NewTopologyQuery creates a new TopologyQueryBuilder for the given Loki config and topology input.

func (*TopologyQueryBuilder) Build added in v0.1.2

func (q *TopologyQueryBuilder) Build() string

Build constructs the full LogQL topology query URL string.

Jump to

Keyboard shortcuts

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