http

package
v0.0.0-...-9b2d5d1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2016 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 1 more Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VcapBackendHeader     = "X-Vcap-Backend"
	CfRouteEndpointHeader = "X-Cf-RouteEndpoint"
	VcapRouterHeader      = "X-Vcap-Router"
	VcapRequestIdHeader   = "X-Vcap-Request-Id"
	VcapTraceHeader       = "X-Vcap-Trace"
	CfInstanceIdHeader    = "X-CF-InstanceID"
	B3TraceIdHeader       = "X-B3-TraceId"
	B3SpanIdHeader        = "X-B3-SpanId"
	B3ParentSpanIdHeader  = "X-B3-ParentSpanId"
	CfAppInstance         = "X-CF-APP-INSTANCE"
)

Variables

This section is empty.

Functions

func SetB3Headers

func SetB3Headers(request *http.Request, logger lager.Logger)

func SetTraceHeaders

func SetTraceHeaders(responseWriter http.ResponseWriter, routerIp, addr string)

func SetVcapRequestIdHeader

func SetVcapRequestIdHeader(request *http.Request, logger lager.Logger)

func ValidateCfAppInstance

func ValidateCfAppInstance(appInstanceHeader string) (string, string, error)

Types

type Authenticator

type Authenticator func(user, password string) bool

type BasicAuth

type BasicAuth struct {
	http.Handler
	Authenticator
}

func (*BasicAuth) ServeHTTP

func (x *BasicAuth) ServeHTTP(w http.ResponseWriter, req *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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