queryparams

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: 3 Imported by: 0

Documentation

Overview

Package queryparams provides shared query parameter types and helpers used by both the Loki and Prometheus query builders.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLabelsAndFilter

func GetLabelsAndFilter(kl map[string][]string, aggregate, groups string) ([]string, string)

GetLabelsAndFilter returns the label fields to aggregate by and an optional extra line filter for the given aggregate and groups configuration. This function is shared by both Loki and Prometheus query builders.

Types

type TopologyInput

type TopologyInput struct {
	Start          string
	End            string
	Top            string
	RateInterval   string
	Step           string
	DataField      string
	MetricFunction constants.MetricFunction
	RecordType     constants.RecordType
	DataSource     constants.DataSource
	PacketLoss     constants.PacketLoss
	Aggregate      string
	Groups         string
}

TopologyInput holds the common query parameters for topology (metrics) queries, shared by both Loki and Prometheus query builders.

func (*TopologyInput) GetActualDataField

func (in *TopologyInput) GetActualDataField() string

GetActualDataField returns the data field for unwrap/aggregation, or empty string for count-type metrics that do not unwrap a specific field.

Jump to

Keyboard shortcuts

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