Documentation ¶
Index ¶
- Variables
- func WithDispatcher(handler http.Handler, dispacher http.Handler) http.Handler
- func WithExtraRequestInfo(handler http.Handler, resolver request.ExtraRequestInfoResolver, ...) http.Handler
- func WithImpersonator(handler http.Handler) http.Handler
- func WithLoadPressureGoaway(inner http.Handler, inflightThreshold int32, qpsThreshold int32, ...) http.Handler
- func WithNoLoggingImpersonation(handler http.Handler, a authorizer.Authorizer, s runtime.NegotiatedSerializer) http.Handler
- func WithNoLoggingPanicRecovery(handler http.Handler) http.Handler
- func WithPreProcessingMetrics(handler http.Handler) http.Handler
- func WithRequestRate(handler http.Handler, ...) http.Handler
- func WithRequestThroughput(handler http.Handler, throughputMonitor *monitor.ThroughputMonitor) http.Handler
- func WithTerminationMetrics(handler http.Handler) http.Handler
- func WithTraceLog(handler http.Handler, enableTracing bool, ...) http.Handler
- func WithUpstreamInfo(handler http.Handler, clusterManager clusters.Manager, ...) http.Handler
Constants ¶
This section is empty.
Variables ¶
var WithRequestInfo = genericapifilters.WithRequestInfo
Functions ¶
func WithDispatcher ¶
func WithExtraRequestInfo ¶
func WithExtraRequestInfo(handler http.Handler, resolver request.ExtraRequestInfoResolver, s runtime.NegotiatedSerializer) http.Handler
WithExtraRequestInfo attaches a request host to the context.
func WithImpersonator ¶
WithImpersonator record impersonator because request user will be replaced by impersonatee
func WithLoadPressureGoaway ¶
func WithLoadPressureGoaway( inner http.Handler, inflightThreshold int32, qpsThreshold int32, throughputThresholdMB int32, chance float64, rateMonitor *monitor.RateMonitor, throughputMonitor *monitor.ThroughputMonitor, ) http.Handler
WithLoadPressureGoaway returns an http.Handler that send GOAWAY probabilistically according to the given chance for HTTP2 requests when proxy server has load pressure. After client receive GOAWAY, the in-flight long-running requests will not be influenced, and the new requests will use a new TCP connection to re-balancing to another server behind the load balance.
func WithNoLoggingImpersonation ¶
func WithNoLoggingImpersonation(handler http.Handler, a authorizer.Authorizer, s runtime.NegotiatedSerializer) http.Handler
the fllowing code is copied from k8s.io/apiserver/pkg/endpoint/filters/impersonation.go and delete httplog for proxy
WithNoLoggingImpersonation is a filter that will inspect and check requests that attempt to change the user.Info for their requests
func WithNoLoggingPanicRecovery ¶
WithNoLoggingPanicRecovery wraps an http Handler to recover and log panics (except in the special case of http.ErrAbortHandler panics, which suppress logging).
func WithPreProcessingMetrics ¶
WithPreProcessingMetrics is a filter that record metrics before request being processed.
func WithRequestRate ¶
func WithRequestRate( handler http.Handler, longRunningRequestCheck apirequest.LongRunningRequestCheck, rateMonitor *monitor.RateMonitor, ) http.Handler
WithRequestRate record request rate and inflight
func WithRequestThroughput ¶
func WithRequestThroughput( handler http.Handler, throughputMonitor *monitor.ThroughputMonitor, ) http.Handler
WithRequestThroughput record request input and output throughput
func WithTraceLog ¶
func WithTraceLog(handler http.Handler, enableTracing bool, longRunningRequestCheck apirequest.LongRunningRequestCheck) http.Handler
WithTraceLog is a filter that record trace log.
func WithUpstreamInfo ¶
func WithUpstreamInfo(handler http.Handler, clusterManager clusters.Manager, s runtime.NegotiatedSerializer) http.Handler
WithUpstreamInfo attaches upstream cluster info to ExtraRequestInfo
Types ¶
This section is empty.