handler

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: Apache-2.0 Imports: 9 Imported by: 5 modules, 35 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 (
	// WarningsHeader is the M3 warnings header when to display a warning to a user
	WarningsHeader = "M3-Warnings"

	// RetryHeader is the M3 retry header to display when it is safe to retry
	RetryHeader = "M3-Retry"

	// ServedByHeader is the M3 query storage execution breakdown
	ServedByHeader = "M3-Storage-By"

	// DeprecatedHeader is the M3 deprecated header
	DeprecatedHeader = "M3-Deprecated"
)
View Source
const (
	// SearchURL is the url to search for metric ids
	SearchURL = "/search"

	// SearchHTTPMethod is the HTTP method used with this resource.
	SearchHTTPMethod = http.MethodPost
)

Variables

This section is empty.

Functions

func CloseWatcher

func CloseWatcher(ctx context.Context, cancel context.CancelFunc, w http.ResponseWriter)

CloseWatcher watches for CloseNotify and context timeout. It is best effort and may sometimes not close the channel relying on gc

func NewSearchHandler

func NewSearchHandler(storage storage.Storage) http.Handler

NewSearchHandler returns a new instance of handler

Types

type HeaderKeyType added in v0.4.5

type HeaderKeyType int

HeaderKeyType is the type for the header key

const (
	// HeaderKey is the key which headers will be added to in the request context
	HeaderKey HeaderKeyType = iota

	// RoutePrefixV1 is the v1 prefix for all coordinator routes
	RoutePrefixV1 = "/api/v1"
)

type SearchHandler

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

SearchHandler represents a handler for the search endpoint

func (*SearchHandler) ServeHTTP

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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