http

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReadTimeout  = 15 * time.Minute
	WriteTimeout = time.Minute
)

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(read, tail, write *url.URL, opts ...HandlerOption) http.Handler

Types

type HandlerOption

type HandlerOption func(h *handlerConfiguration)

HandlerOption modifies the handler's configuration.

func HandlerInstrumenter

func HandlerInstrumenter(instrumenter handlerInstrumenter) HandlerOption

HandlerInstrumenter adds a custom HTTP handler instrument middleware for the handler to use.

func Logger

func Logger(logger log.Logger) HandlerOption

Logger add a custom logger for the handler to use.

func ReadMiddleware

func ReadMiddleware(m func(http.Handler) http.Handler) HandlerOption

ReadMiddleware adds a middleware for all read operations.

func Registry

func Registry(r *prometheus.Registry) HandlerOption

Registry adds a custom Prometheus registry for the handler to use.

func SpanRoutePrefix

func SpanRoutePrefix(spanRoutePrefix string) HandlerOption

SpanRoutePrefix adds a prefix before the value of route tag in tracing spans.

func WriteMiddleware

func WriteMiddleware(m func(http.Handler) http.Handler) HandlerOption

WriteMiddleware adds a middleware for all write operations.

Jump to

Keyboard shortcuts

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