round_tripper

package
v0.0.0-...-2fc2a81 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2018 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 1 more Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VcapCookieId              = "__VCAP_ID__"
	StickyCookieKey           = "JSESSIONID"
	CookieHeader              = "Set-Cookie"
	BadGatewayMessage         = "502 Bad Gateway: Registered endpoint failed to handle the request."
	HostnameErrorMessage      = "503 Service Unavailable"
	InvalidCertificateMessage = "526 Invalid SSL Certificate"
	SSLHandshakeMessage       = "525 SSL Handshake Failed"
	SSLCertRequiredMessage    = "496 SSL Certificate Required"
	ContextCancelledMessage   = "499 Request Cancelled"
)

Variables

Functions

This section is empty.

Types

type ErrorHandler

type ErrorHandler struct {
	MetricReporter metrics.ProxyReporter
	ErrorSpecs     []ErrorSpec
}

func (*ErrorHandler) HandleError

func (eh *ErrorHandler) HandleError(responseWriter utils.ProxyResponseWriter, err error)

type ErrorSpec

type ErrorSpec struct {
	Classifier  fails.Classifier
	Message     string
	Code        int
	HandleError func(reporter metrics.ProxyReporter)
}

type FactoryImpl

type FactoryImpl struct {
	Template *http.Transport
}

func (*FactoryImpl) New

func (t *FactoryImpl) New(expectedServerName string) ProxyRoundTripper

type ProxyRoundTripper

type ProxyRoundTripper interface {
	http.RoundTripper
	CancelRequest(*http.Request)
}

func GetRoundTripper

func GetRoundTripper(e *route.Endpoint, roundTripperFactory RoundTripperFactory) ProxyRoundTripper

func NewDropsondeRoundTripper

func NewDropsondeRoundTripper(p ProxyRoundTripper) ProxyRoundTripper

func NewProxyRoundTripper

func NewProxyRoundTripper(
	roundTripperFactory RoundTripperFactory,
	retryableClassifier fails.Classifier,
	logger logger.Logger,
	defaultLoadBalance string,
	combinedReporter metrics.ProxyReporter,
	secureCookies bool,
	errorHandler errorHandler,
	routeServicesTransport http.RoundTripper,
	endpointTimeout time.Duration,
) ProxyRoundTripper

type RoundTripperFactory

type RoundTripperFactory interface {
	New(expectedServerName string) ProxyRoundTripper
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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