proxy

package
Version: v0.0.0-...-b7aefed Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2014 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VcapCookieId    = "__VCAP_ID__"
	StickyCookieKey = "JSESSIONID"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AfterRoundTrip

type AfterRoundTrip func(rsp *http.Response, endpoint *route.Endpoint, err error)

type LookupRegistry

type LookupRegistry interface {
	Lookup(uri route.Uri) *route.Pool
}

type Proxy

type Proxy interface {
	ServeHTTP(responseWriter http.ResponseWriter, request *http.Request)
	Wait()
}

func NewProxy

func NewProxy(args ProxyArgs) Proxy

type ProxyArgs

type ProxyArgs struct {
	EndpointTimeout time.Duration
	Ip              string
	TraceKey        string
	Registry        LookupRegistry
	Reporter        ProxyReporter
	AccessLogger    access_log.AccessLogger
}

type ProxyReporter

type ProxyReporter interface {
	CaptureBadRequest(req *http.Request)
	CaptureBadGateway(req *http.Request)
	CaptureRoutingRequest(b *route.Endpoint, req *http.Request)
	CaptureRoutingResponse(b *route.Endpoint, res *http.Response, t time.Time, d time.Duration)
}

type RequestHandler

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

func NewRequestHandler

func NewRequestHandler(request *http.Request, response http.ResponseWriter, r ProxyReporter,
	alr *access_log.AccessLogRecord) RequestHandler

func (*RequestHandler) HandleBadGateway

func (h *RequestHandler) HandleBadGateway(err error)

func (*RequestHandler) HandleHeartbeat

func (h *RequestHandler) HandleHeartbeat()

func (*RequestHandler) HandleMissingRoute

func (h *RequestHandler) HandleMissingRoute()

func (*RequestHandler) HandleTcpRequest

func (h *RequestHandler) HandleTcpRequest(iter route.EndpointIterator)

func (*RequestHandler) HandleUnsupportedProtocol

func (h *RequestHandler) HandleUnsupportedProtocol()

func (*RequestHandler) HandleWebSocketRequest

func (h *RequestHandler) HandleWebSocketRequest(iter route.EndpointIterator)

func (*RequestHandler) Logger

func (h *RequestHandler) Logger() *steno.Logger

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL