package
0.0.3
Repository: https://github.com/bhojpur/knative-pkg.git
Documentation: pkg.go.dev

# Packages

Package handlers holds useful HTTP handler implementations.

# Functions

ErrorHandler sets up a handler suitable for use with the ErrorHandler field on httputil's reverse proxy.
GetClusterDomainName returns cluster's domain name or an error Closes issue: https://github.com/knative/eventing/issues/714.
GetServiceHostname returns the fully qualified service hostname.
IsKubeletProbe returns true if the request is a Kubernetes probe.
NewAutoTransport creates a RoundTripper that can use appropriate transport based on the request's HTTP version.
NewBackoffDialer returns a dialer that executes `net.Dialer.DialContext()` with exponentially increasing dial timeouts.
NewH2CTransport constructs a new H2C transport.
NewProberTransport creates a RoundTripper that is useful for probing, since it will not cache connections.
NewProxyAutoTLSTransport is same with NewProxyAutoTransport but it has tls.Config to create HTTPS request.
NewProxyAutoTransport creates a RoundTripper suitable for use by a reverse proxy.
NewServer returns a new HTTP Server with HTTP2 handler.
NewTLSBackoffDialer is same with NewBackoffDialer but takes tls config.

# Constants

DefaultDrainTimeout is the time that Knative components on the data path will wait before shutting down server, but after starting to fail readiness probes to ensure network layer propagation and so that no requests are routed to this pod.
HashHeaderName is the name of an internal header that Ingress controller uses to find out which version of the networking config is deployed.
KubeletProbeHeaderName is the header name to augment the probes, because Istio with mTLS rewrites probes, but their probes pass a different user-agent.
KubeProbeUAPrefix is the prefix for the User-Agent header.
ProbeHeaderName is the name of a header that can be added to requests to probe the knative networking layer.
ProbeHeaderValue is the value of a header that can be added to requests to probe the knative networking layer.
UserAgentKey is the constant for header "User-Agent".

# Variables

AutoTransport uses h2c for HTTP2 requests and falls back to `http.DefaultTransport` for all others.
DialTLSWithBackOff is same with DialWithBackOff but takes tls config.
DialWithBackOff executes `net.Dialer.DialContext()` with exponentially increasing dial timeouts.

# Type aliases

RoundTripperFunc implementation roundtrips a request.