prometheus

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: MIT Imports: 0 Imported by: 26

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(target *Prometheus)

Option represents an option that can be used to configure a prometheus query.

func Legend

func Legend(legend string) Option

Legend sets the legend format.

func Ref

func Ref(ref string) Option

Ref sets the reference ID for this query.

type Prometheus

type Prometheus struct {
	Ref            string
	Expr           string
	IntervalFactor int
	Interval       string
	Step           int
	LegendFormat   string
	Instant        bool
	Format         string
}

Prometheus represents a prometheus query.

func New

func New(query string, options ...Option) *Prometheus

New creates a new prometheus query.

Jump to

Keyboard shortcuts

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