util

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

util provides general utility functions for promql-cli

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UniqLabels

func UniqLabels(result model.Value) (labels []model.LabelName, err error)

UniqLabels takes an interface model.Value and returns a slice of label names.

Types

type TermDimensions

type TermDimensions struct {
	Height int
	Width  int
}

TermDimensions stores the width and height of the current terminal window Used when setting the ascii graph size for range queries

func TerminalSize

func TerminalSize() (dimensions TermDimensions, err error)

TerminalSize returns the current height and width [h,w] of the terminal promql is executed in.

Jump to

Keyboard shortcuts

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