native

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2019 License: Apache-2.0 Imports: 30 Imported by: 5 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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
)

Variables

This section is empty.

Functions

func NewCompleteTagsHandler added in v0.5.0

func NewCompleteTagsHandler(
	storage storage.Storage,
) http.Handler

NewCompleteTagsHandler 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 PromReadHandler

type PromReadHandler struct {
	// contains filtered or unexported fields
}

PromReadHandler represents a handler for prometheus read endpoint.

func NewPromReadHandler

func NewPromReadHandler(
	engine *executor.Engine,
	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,
) ([]*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,
	tagOpts models.TagOptions,
	timeoutOpts *prometheus.TimeoutOpts,
) *PromReadInstantHandler

NewPromReadInstantHandler returns a new instance of handler.

func (*PromReadInstantHandler) ServeHTTP added in v0.5.0

type ReadResponse

type ReadResponse struct {
	Results []ts.Series `json:"results,omitempty"`
}

ReadResponse is the response that gets returned to the user

type RespError added in v0.5.0

type RespError struct {
	Err  error
	Code int
}

RespError wraps error and status code

Jump to

Keyboard shortcuts

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