Documentation ¶
Index ¶
- Constants
- Variables
- type ErrorHandler
- type ErrorSpec
- type FactoryImpl
- type ProxyRoundTripper
- func GetRoundTripper(endpoint *route.Endpoint, roundTripperFactory RoundTripperFactory, ...) ProxyRoundTripper
- func NewDropsondeRoundTripper(p ProxyRoundTripper) ProxyRoundTripper
- func NewProxyRoundTripper(roundTripperFactory RoundTripperFactory, retriableClassifiers fails.Classifier, ...) ProxyRoundTripper
- type RoundTripperFactory
Constants ¶
View Source
const ( VcapCookieId = "__VCAP_ID__" 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" HTTP2Protocol = "http2" )
Variables ¶
View Source
var DefaultErrorSpecs = []ErrorSpec{ {fails.AttemptedTLSWithNonTLSBackend, SSLHandshakeMessage, 525, handleSSLHandshake}, {fails.HostnameMismatch, HostnameErrorMessage, http.StatusServiceUnavailable, handleHostnameMismatch}, {fails.UntrustedCert, InvalidCertificateMessage, 526, handleUntrustedCert}, {fails.RemoteFailedCertCheck, SSLCertRequiredMessage, 496, nil}, {fails.ContextCancelled, ContextCancelledMessage, 499, nil}, {fails.RemoteHandshakeFailure, SSLHandshakeMessage, 525, handleSSLHandshake}, }
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 { BackendTemplate *http.Transport RouteServiceTemplate *http.Transport IsInstrumented bool }
func (*FactoryImpl) New ¶
func (t *FactoryImpl) New(expectedServerName string, isRouteService bool, isHttp2 bool) ProxyRoundTripper
type ProxyRoundTripper ¶
type ProxyRoundTripper interface { http.RoundTripper CancelRequest(*http.Request) }
func GetRoundTripper ¶
func GetRoundTripper(endpoint *route.Endpoint, roundTripperFactory RoundTripperFactory, isRouteService, http2Enabled bool) ProxyRoundTripper
func NewDropsondeRoundTripper ¶
func NewDropsondeRoundTripper(p ProxyRoundTripper) ProxyRoundTripper
func NewProxyRoundTripper ¶
func NewProxyRoundTripper( roundTripperFactory RoundTripperFactory, retriableClassifiers fails.Classifier, logger logger.Logger, combinedReporter metrics.ProxyReporter, errHandler errorHandler, routeServicesTransport http.RoundTripper, cfg *config.Config, ) ProxyRoundTripper
type RoundTripperFactory ¶
type RoundTripperFactory interface {
New(expectedServerName string, isRouteService, isHttp2 bool) ProxyRoundTripper
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.