prom

package
v0.0.0-...-82de52e Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	core.Context
	Expr         promql.Expr
	Bucketizer   string
	Mapper       string
	MapperValue  string
	HasMapper    bool
	HasFunction  bool
	FunctionName string
	Args         []string
	IsInstant    bool
	// contains filtered or unexported fields
}

Context is holding the informations like token, start, end, and so on

type QL

type QL struct {
	QueryEngine *promql.Engine

	ReqCounter prometheus.Counter
}

QL is the underlying struct to handle PromQL

func NewPromQL

func NewPromQL() *QL

NewPromQL returns a new Prometheus Server

func (*QL) Delete

func (p *QL) Delete(w http.ResponseWriter, r *http.Request)

Delete matched series entirely from a Prometheus server URL query parameters: - match[]=<series_selector>: Repeated label matcher argument that selects the series to delete. At least one match[] argument must be provided. FIXME: handle Delete

func (*QL) FindAndDeleteSeries

func (p *QL) FindAndDeleteSeries(w http.ResponseWriter, r *http.Request)

FindAndDeleteSeries is handling /find and /delete for series

func (*QL) FindLabelsValues

func (p *QL) FindLabelsValues(ctx echo.Context) error

FindLabelsValues is handling finding labels values

func (*QL) FindSeries

func (p *QL) FindSeries(w http.ResponseWriter, r *http.Request)

FindSeries returns the list of time series that match a certain label set.

func (*QL) GetReqCounter

func (p *QL) GetReqCounter() prometheus.Counter

GetReqCounter satisfies the protocol interface

func (*QL) InstantQuery

func (p *QL) InstantQuery(w http.ResponseWriter, r *http.Request)

InstantQuery evaluates an instant query at a single point in time. URL query parameters: - query=<string>: Prometheus expression query string. - time=<rfc3339 | unix_timestamp>: Evaluation timestamp. Optional. - timeout=<duration>: Evaluation timeout. Optional. Defaults to and is capped by the value of the -query.timeout flag.

func (*QL) QueryRange

func (p *QL) QueryRange(w http.ResponseWriter, r *http.Request)

QueryRange evaluates an expression query over a range of time: URL query parameters: - query=<string>: Prometheus expression query string. - start=<rfc3339 | unix_timestamp>: Start timestamp. - end=<rfc3339 | unix_timestamp>: End timestamp. - step=<duration>: Query resolution step width.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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