Documentation ¶
Index ¶
- Variables
- func NewHTTPTransport(v1 http.RoundTripper, v2 http.RoundTripper) http.RoundTripper
- func NewRetryRoundTripper(rt http.RoundTripper, l *zap.SugaredLogger, b wait.Backoff, ...) http.RoundTripper
- func NewRewinder(rc io.ReadCloser) io.ReadCloser
- func SetupHeaderPruning(p *httputil.ReverseProxy)
- type RetryCond
- type RoundTripperFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var AutoTransport = NewHTTPTransport(http.DefaultTransport, h2cutil.DefaultTransport)
AutoTransport uses h2c for HTTP2 requests and falls back to `http.DefaultTransport` for all others
Functions ¶
func NewHTTPTransport ¶
func NewHTTPTransport(v1 http.RoundTripper, v2 http.RoundTripper) http.RoundTripper
NewHttpTransport will use the appropriate transport for the request's HTTP protocol version
func NewRetryRoundTripper ¶
func NewRetryRoundTripper(rt http.RoundTripper, l *zap.SugaredLogger, b wait.Backoff, conditions ...RetryCond) http.RoundTripper
RetryRoundTripper retries a request on error or retry condition, using the given `retry` strategy
func NewRewinder ¶
func NewRewinder(rc io.ReadCloser) io.ReadCloser
rewinder wraps a single-use `ReadCloser` into a `ReadCloser` that can be read multiple times
func SetupHeaderPruning ¶
func SetupHeaderPruning(p *httputil.ReverseProxy)
SetupHeaderPruning will cause the http.ReverseProxy to not forward activator headers
Types ¶
type RetryCond ¶
func RetryStatus ¶
RetryStatus will filter responses matching `status`
Click to show internal directories.
Click to hide internal directories.