Documentation ¶
Index ¶
- Variables
- func IsProxyForwarded(ctx context.Context) bool
- func LogThreshold(verb string) time.Duration
- func SetFlowControl(ctx context.Context, flowControl string) error
- func SetProxyForwarded(ctx context.Context, endpoint string) error
- func SetProxyTerminated(ctx context.Context, reason string) error
- func WithExtraRequestInfo(parent context.Context, info *ExtraRequestInfo) context.Context
- func WithProxyInfo(parent context.Context, info *ProxyInfo) context.Context
- type ExtraRequestInfo
- type ExtraRequestInfoFactory
- type ExtraRequestInfoResolver
- type ProxyInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ShortRequestLogThreshold = time.Second * 5 ListRequestLogThreshold = time.Second * 30 )
Functions ¶
func IsProxyForwarded ¶
func LogThreshold ¶
func WithExtraRequestInfo ¶
func WithExtraRequestInfo(parent context.Context, info *ExtraRequestInfo) context.Context
WithExtraRequestInfo returns a copy of parent in which the ExtraRequestInfo value is set
Types ¶
type ExtraRequestInfo ¶
type ExtraRequestInfo struct { Scheme string Hostname string // hostname without port IsImpersonateRequest bool Impersonator user.Info UpstreamCluster *clusters.ClusterInfo IsProxyRequest bool }
func ExtraRequestInfoFrom ¶
func ExtraRequestInfoFrom(ctx context.Context) (*ExtraRequestInfo, bool)
ExtraRequestInfoFrom returns the value of the ExtraRequestInfo key on the ctx
type ExtraRequestInfoFactory ¶
type ExtraRequestInfoFactory struct{}
func (*ExtraRequestInfoFactory) NewExtraRequestInfo ¶
func (f *ExtraRequestInfoFactory) NewExtraRequestInfo(req *http.Request) (*ExtraRequestInfo, error)
type ExtraRequestInfoResolver ¶
type ExtraRequestInfoResolver interface {
NewExtraRequestInfo(req *http.Request) (*ExtraRequestInfo, error)
}
type ProxyInfo ¶
ProxyInfo contains information that indicates if the request is proxied
func ExtraProxyInfoFrom ¶
ExtraProxyInfoFrom returns the value of the ExtraRequestInfo key on the ctx
func NewProxyInfo ¶
func NewProxyInfo() *ProxyInfo
Click to show internal directories.
Click to hide internal directories.