Documentation ¶
Index ¶
- Constants
- Variables
- func NewCompleteTagsHandler(storage storage.Storage, fetchOptionsBuilder handler.FetchOptionsBuilder) http.Handler
- func NewListTagsHandler(storage storage.Storage, fetchOptionsBuilder handler.FetchOptionsBuilder, ...) http.Handler
- type CompleteTagsHandler
- type ListTagsHandler
- type PromReadHandler
- type PromReadInstantHandler
- type ReadResponse
- type RespError
Constants ¶
View Source
const ( // CompleteTagsURL is the url for searching tags. CompleteTagsURL = handler.RoutePrefixV1 + "/search" // CompleteTagsHTTPMethod is the HTTP method used with this resource. CompleteTagsHTTPMethod = http.MethodGet )
View Source
const ( // PromReadURL is the url for native prom read handler, this matches the // default URL for the query range endpoint found on a Prometheus server PromReadURL = handler.RoutePrefixV1 + "/query_range" // PromReadHTTPMethod is the HTTP method used with this resource. PromReadHTTPMethod = http.MethodGet )
View Source
const ( // PromReadInstantURL is the url for native instantaneous prom read // handler, this matches the default URL for the query endpoint // found on a Prometheus server PromReadInstantURL = handler.RoutePrefixV1 + "/query" // PromReadInstantHTTPMethod is the HTTP method used with this resource. PromReadInstantHTTPMethod = http.MethodGet )
View Source
const ( // ListTagsURL is the url for listing tags. ListTagsURL = handler.RoutePrefixV1 + "/labels" )
Variables ¶
View Source
var ( // ListTagsHTTPMethods are the HTTP methods used with this resource. ListTagsHTTPMethods = []string{http.MethodGet, http.MethodPost} )
Functions ¶
func NewCompleteTagsHandler ¶ added in v0.5.0
func NewCompleteTagsHandler( storage storage.Storage, fetchOptionsBuilder handler.FetchOptionsBuilder, ) http.Handler
NewCompleteTagsHandler returns a new instance of handler.
func NewListTagsHandler ¶ added in v0.9.0
func NewListTagsHandler( storage storage.Storage, fetchOptionsBuilder handler.FetchOptionsBuilder, nowFn clock.NowFn, ) http.Handler
NewListTagsHandler returns a new instance of handler.
Types ¶
type CompleteTagsHandler ¶ added in v0.5.0
type CompleteTagsHandler struct {
// contains filtered or unexported fields
}
CompleteTagsHandler represents a handler for search tags endpoint.
func (*CompleteTagsHandler) ServeHTTP ¶ added in v0.5.0
func (h *CompleteTagsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ListTagsHandler ¶ added in v0.9.0
type ListTagsHandler struct {
// contains filtered or unexported fields
}
ListTagsHandler represents a handler for list tags endpoint.
func (*ListTagsHandler) ServeHTTP ¶ added in v0.9.0
func (h *ListTagsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type PromReadHandler ¶
type PromReadHandler struct {
// contains filtered or unexported fields
}
PromReadHandler represents a handler for prometheus read endpoint.
func NewPromReadHandler ¶
func NewPromReadHandler( engine executor.Engine, fetchOptionsBuilder handler.FetchOptionsBuilder, tagOpts models.TagOptions, limitsCfg *config.LimitsConfiguration, scope tally.Scope, timeoutOpts *prometheus.TimeoutOpts, keepNans bool, ) *PromReadHandler
NewPromReadHandler returns a new instance of handler.
func (*PromReadHandler) ServeHTTP ¶
func (h *PromReadHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*PromReadHandler) ServeHTTPWithEngine ¶ added in v0.5.0
func (h *PromReadHandler) ServeHTTPWithEngine( w http.ResponseWriter, r *http.Request, engine executor.Engine, opts *executor.QueryOptions, ) ([]*ts.Series, models.RequestParams, *RespError)
ServeHTTPWithEngine returns query results from the storage
type PromReadInstantHandler ¶ added in v0.5.0
type PromReadInstantHandler struct {
// contains filtered or unexported fields
}
PromReadInstantHandler represents a handler for prometheus instantaneous read endpoint.
func NewPromReadInstantHandler ¶ added in v0.5.0
func NewPromReadInstantHandler( engine executor.Engine, fetchOptionsBuilder handler.FetchOptionsBuilder, tagOpts models.TagOptions, timeoutOpts *prometheus.TimeoutOpts, ) *PromReadInstantHandler
NewPromReadInstantHandler returns a new instance of handler.
func (*PromReadInstantHandler) ServeHTTP ¶ added in v0.5.0
func (h *PromReadInstantHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ReadResponse ¶
ReadResponse is the response that gets returned to the user
Click to show internal directories.
Click to hide internal directories.