util

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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 NewRewinder

func NewRewinder(rc io.ReadCloser) io.ReadCloser

NewRewinder 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 RoundTripperFunc

type RoundTripperFunc func(*http.Request) (*http.Response, error)

RoundTripperFunc implementation roundtrips a request.

func (RoundTripperFunc) RoundTrip

func (rt RoundTripperFunc) RoundTrip(r *http.Request) (*http.Response, error)

RoundTrip implements http.RoundTripper.

Jump to

Keyboard shortcuts

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