remote

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 33 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// PromReadURL is the url for remote prom read handler
	PromReadURL = handler.RoutePrefixV1 + "/prom/remote/read"

	// PromReadHTTPMethod is the HTTP method used with this resource.
	PromReadHTTPMethod = http.MethodPost
)
View Source
const (
	// NameReplace is the parameter that gets replaced.
	NameReplace = "name"

	// TagValuesURL is the url for tag values.
	TagValuesURL = handler.RoutePrefixV1 +
		"/label/{" + NameReplace + "}/values"

	// TagValuesHTTPMethod is the HTTP method used with this resource.
	TagValuesHTTPMethod = http.MethodGet
)
View Source
const (
	// PromWriteURL is the url for the prom write handler
	PromWriteURL = handler.RoutePrefixV1 + "/prom/remote/write"

	// PromWriteHTTPMethod is the HTTP method used with this resource.
	PromWriteHTTPMethod = http.MethodPost
)
View Source
const (
	// PromSeriesMatchURL is the url for remote prom series matcher handler.
	PromSeriesMatchURL = handler.RoutePrefixV1 + "/series"
)

Variables

View Source
var (
	// PromSeriesMatchHTTPMethods are the HTTP methods used with this resource.
	PromSeriesMatchHTTPMethods = []string{http.MethodGet, http.MethodPost}
)

Functions

func NewPromReadHandler

func NewPromReadHandler(
	engine executor.Engine,
	fetchOptionsBuilder handler.FetchOptionsBuilder,
	timeoutOpts *prometheus.TimeoutOpts,
	keepEmpty bool,
	instrumentOpts instrument.Options,
) http.Handler

NewPromReadHandler returns a new instance of handler.

func NewPromSeriesMatchHandler added in v0.5.0

func NewPromSeriesMatchHandler(
	storage storage.Storage,
	tagOptions models.TagOptions,
	fetchOptionsBuilder handler.FetchOptionsBuilder,
	instrumentOpts instrument.Options,
) http.Handler

NewPromSeriesMatchHandler returns a new instance of handler.

func NewPromWriteHandler

func NewPromWriteHandler(
	downsamplerAndWriter ingest.DownsamplerAndWriter,
	tagOptions models.TagOptions,
	forwarding PromWriteHandlerForwardingOptions,
	nowFn clock.NowFn,
	instrumentOpts instrument.Options,
) (http.Handler, error)

NewPromWriteHandler returns a new instance of handler.

func NewTagValuesHandler added in v0.5.0

func NewTagValuesHandler(
	storage storage.Storage,
	fetchOptionsBuilder handler.FetchOptionsBuilder,
	nowFn clock.NowFn,
	instrumentOpts instrument.Options,
) http.Handler

NewTagValuesHandler returns a new instance of handler.

Types

type PromReadHandler

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

PromReadHandler represents a handler for prometheus read endpoint.

func (*PromReadHandler) ServeHTTP

func (h *PromReadHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type PromSeriesMatchHandler added in v0.5.0

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

PromSeriesMatchHandler represents a handler for prometheus series matcher endpoint.

func (*PromSeriesMatchHandler) ServeHTTP added in v0.5.0

type PromWriteHandler

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

PromWriteHandler represents a handler for prometheus write endpoint.

func (*PromWriteHandler) ServeHTTP

func (h *PromWriteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type PromWriteHandlerForwardTargetOptions added in v0.13.0

type PromWriteHandlerForwardTargetOptions struct {
	// URL of the target to send to.
	URL string `yaml:"url"`
	// Method defaults to POST if not set.
	Method string `yaml:"method"`
}

PromWriteHandlerForwardTargetOptions is a prometheus write handler forwarder target.

type PromWriteHandlerForwardingOptions added in v0.13.0

type PromWriteHandlerForwardingOptions struct {
	// MaxConcurrency is the max parallel forwarding and if zero will be unlimited.
	MaxConcurrency int                                    `yaml:"maxConcurrency"`
	Timeout        time.Duration                          `yaml:"timeout"`
	Targets        []PromWriteHandlerForwardTargetOptions `yaml:"targets"`
}

PromWriteHandlerForwardingOptions is the forwarding options for prometheus write handler.

type TagValuesHandler added in v0.5.0

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

TagValuesHandler represents a handler for search tags endpoint.

func (*TagValuesHandler) ServeHTTP added in v0.5.0

func (h *TagValuesHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type TagValuesResponse added in v0.5.0

type TagValuesResponse struct {
	Results storage.CompleteTagsResult `json:"results,omitempty"`
}

TagValuesResponse is the response that gets returned to the user

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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