round_tripper

package
v0.0.0-...-a602bb6 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 1 more Imports: 22 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__"
	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"
	AuthNegotiateHeaderCookieMaxAgeInSeconds = 60
)

Variables

View Source
var (
	NoEndpointsAvailable   = errors.New("No endpoints available")
	TooManyResponseHeaders = errors.New("Too many response headers")
)

Functions

This section is empty.

Types

type ErrorHandler

type ErrorHandler struct {
	MetricReporter metrics.MetricReporter
	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.MetricReporter)
}

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 *slog.Logger,
	combinedReporter metrics.MetricReporter,
	errHandler errorHandler,
	routeServicesTransport http.RoundTripper,
	cfg *config.Config,
) ProxyRoundTripper

type RoundTripperFactory

type RoundTripperFactory interface {
	New(expectedServerName string, isRouteService, isHttp2 bool) ProxyRoundTripper
}

Source Files

  • dropsonde_round_tripper.go
  • error_handler.go
  • proxy_round_tripper.go
  • trace.go

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