Documentation ¶
Index ¶
- type Context
- type QL
- func (p *QL) Delete(w http.ResponseWriter, r *http.Request)
- func (p *QL) FindAndDeleteSeries(w http.ResponseWriter, r *http.Request)
- func (p *QL) FindLabelsValues(ctx echo.Context) error
- func (p *QL) FindSeries(w http.ResponseWriter, r *http.Request)
- func (p *QL) GetReqCounter() prometheus.Counter
- func (p *QL) InstantQuery(w http.ResponseWriter, r *http.Request)
- func (p *QL) QueryRange(w http.ResponseWriter, r *http.Request)
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 (*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 ¶
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.