Documentation ¶
Index ¶
- func NewProxyEndpoint(logger log.Logger, downstream string, options ...ProxyOption) (endpoint.Endpoint, error)
- type Proxy
- type ProxyOption
- func ProxyWithCustomTransport(rt net_http.RoundTripper) ProxyOption
- func ProxyWithModifiedTransport(dialerTimeout time.Duration, dialerKeepAlive time.Duration, ...) ProxyOption
- func ProxyWithRequestOptions(fns ...RequestOption) ProxyOption
- func ProxyWithResponseOptions(fns ...ResponseOption) ProxyOption
- type RequestOption
- type ResponseOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProxyEndpoint ¶
func NewProxyEndpoint( logger log.Logger, downstream string, options ...ProxyOption, ) (endpoint.Endpoint, error)
NewProxyEndpoint returns an Endpoint which handles an incoming http.Request
Types ¶
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy defines a reverse proxy for wingman
type ProxyOption ¶
type ProxyOption func(*Proxy)
ProxyOption is set of options which can modify proxy
func ProxyWithCustomTransport ¶
func ProxyWithCustomTransport(rt net_http.RoundTripper) ProxyOption
ProxyWithCustomTransport provides option to set custom roundtripper for the reverse proxy
func ProxyWithModifiedTransport ¶
func ProxyWithModifiedTransport( dialerTimeout time.Duration, dialerKeepAlive time.Duration, idleConnTimeout time.Duration, maxIdle int, ) ProxyOption
ProxyWithModifiedTransport provides option to customize the transport used in dialing downstream
func ProxyWithRequestOptions ¶
func ProxyWithRequestOptions(fns ...RequestOption) ProxyOption
ProxyWithRequestOptions provies option to append custom RequestOption for the reverse proxy
func ProxyWithResponseOptions ¶
func ProxyWithResponseOptions(fns ...ResponseOption) ProxyOption
ProxyWithResponseOptions provies option to append custom ResponseOptions for the reverse proxy
type RequestOption ¶
RequestOption defines means to modify request
type ResponseOption ¶
ResponseOption defines means to modify response
Click to show internal directories.
Click to hide internal directories.