proxy

package
v0.0.0-...-8ab5ff9 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2016 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 1 more Imports: 21 Imported by: ? modules, 0 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 (
	VcapCookieId    = "__VCAP_ID__"
	StickyCookieKey = "JSESSIONID"
)

Variables

This section is empty.

Functions

func NewProxyResponseWriter

func NewProxyResponseWriter(w http.ResponseWriter) *proxyResponseWriter

func NewProxyRoundTripper

func NewProxyRoundTripper(backend bool, transport http.RoundTripper, endpointIterator route.EndpointIterator,
	handler RequestHandler, afterRoundTrip AfterRoundTrip) http.RoundTripper

func SetupProxyRequest

func SetupProxyRequest(source *http.Request, target *http.Request,
	routeServiceArgs route_service.RouteServiceArgs,
	routeServiceConfig *route_service.RouteServiceConfig)

func ValidHost

func ValidHost(host string) bool

checks for valid host characters (not format)

Types

type AfterRoundTrip

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

type BackendRoundTripper

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

func (*BackendRoundTripper) RoundTrip

func (rt *BackendRoundTripper) RoundTrip(request *http.Request) (*http.Response, error)

type LookupRegistry

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

type Proxy

type Proxy interface {
	ServeHTTP(responseWriter http.ResponseWriter, request *http.Request)
	// Drain signals Proxy that the gorouter is about to shutdown
	Drain()
}

func NewProxy

func NewProxy(args ProxyArgs) Proxy

type ProxyArgs

type ProxyArgs struct {
	EndpointTimeout            time.Duration
	Ip                         string
	TraceKey                   string
	Registry                   LookupRegistry
	Reporter                   metrics.ProxyReporter
	AccessLogger               access_log.AccessLogger
	SecureCookies              bool
	TLSConfig                  *tls.Config
	RouteServiceEnabled        bool
	RouteServiceTimeout        time.Duration
	RouteServiceRecommendHttps bool
	Crypto                     secure.Crypto
	CryptoPrev                 secure.Crypto
	ExtraHeadersToLog          []string
	Logger                     lager.Logger
}

type ProxyResponseWriter

type ProxyResponseWriter interface {
	Header() http.Header
	Hijack() (net.Conn, *bufio.ReadWriter, error)
	Write(b []byte) (int, error)
	WriteHeader(s int)
	Done()
	Flush()
	Status() int
	Size() int
}

type RequestHandler

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

func (*RequestHandler) AddLoggingData

func (h *RequestHandler) AddLoggingData(data lager.Data)

func (*RequestHandler) HandleBadGateway

func (h *RequestHandler) HandleBadGateway(err error)

func (*RequestHandler) HandleBadSignature

func (h *RequestHandler) HandleBadSignature(err error)

func (*RequestHandler) HandleHeartbeat

func (h *RequestHandler) HandleHeartbeat(ok bool)

func (*RequestHandler) HandleMissingRoute

func (h *RequestHandler) HandleMissingRoute()

func (*RequestHandler) HandleRouteServiceFailure

func (h *RequestHandler) HandleRouteServiceFailure(err error)

func (*RequestHandler) HandleTcpRequest

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

func (*RequestHandler) HandleUnsupportedProtocol

func (h *RequestHandler) HandleUnsupportedProtocol()

func (*RequestHandler) HandleUnsupportedRouteService

func (h *RequestHandler) HandleUnsupportedRouteService()

func (*RequestHandler) HandleWebSocketRequest

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

func (*RequestHandler) Logger

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

type RouteServiceRoundTripper

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

func (*RouteServiceRoundTripper) RoundTrip

func (rt *RouteServiceRoundTripper) RoundTrip(request *http.Request) (*http.Response, error)

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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