utils

package
v0.15.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 7 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrafanaQueries

type GrafanaQueries struct {
	// QueryGroup is the general category for these queries.
	QueryGroup string
	// Queries is a list of Grafana dashboard compatible queries.
	Queries []GrafanaQuery
	// Index is this query group's index.
	Index int
}

GrafanaQueries is a list of Grafana dashboard compatible queries.

func ParseFileToGrafanaQueries

func ParseFileToGrafanaQueries(
	fileName string,
	log *zap.Logger,
) ([]GrafanaQueries, error)

ParseFileToGrafanaQueries parses a JSON queries file into Grafana dashboard compatible queries.

type GrafanaQuery

type GrafanaQuery struct {
	// Query is the query.
	Query string
	// Interval is the step size.
	Interval string
	// Index is this query's index.
	Index int
	// Left indicates if this panel is on the left.
	Left bool
}

GrafanaQuery is a Grafana dashboard compatible query.

type InputQueries

type InputQueries []InputQuery

InputQueries is a slice of InputQuery.

type InputQuery

type InputQuery struct {
	// QueryGroup is the general category for these queries.
	QueryGroup string `json:"queryGroup"`
	// Queries is the list of raw queries.
	Queries []string `json:"queries"`
	// Steps is the list of step sizes for these queries.
	Steps []string `json:"steps"`
}

InputQuery is the JSON representation of a query to be compared.

type PromQLQueryGroup

type PromQLQueryGroup struct {
	// QueryGroup is the general category for these queries.
	QueryGroup string
	// Queries is a list of PromQL compatible queries.
	Queries []string
}

PromQLQueryGroup is a list of constructed PromQL query groups.

func ParseFileToPromQLQueryGroup

func ParseFileToPromQLQueryGroup(
	fileName string,
	start int64,
	end int64,
	log *zap.Logger,
) ([]PromQLQueryGroup, error)

ParseFileToPromQLQueryGroup parses a JSON queries file into PromQL query groups.

Jump to

Keyboard shortcuts

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