Versions in this module Expand all Collapse all v0 v0.1.2 May 2, 2023 v0.1.1 May 2, 2023 Changes in this version + var DefaultDialer = websocket.DefaultDialer + var DefaultUpgrader = &websocket.FastHTTPUpgrader + type Factory func(string) (*ReverseProxy, error) + type IBalancer interface + Distribute func() int + func NewBalancer(ws []W) IBalancer + type Option interface + func WithAddress(addresses ...string) Option + func WithBalancer(addrWeights map[string]Weight) Option + func WithDebug() Option + func WithDisablePathNormalizing(isDisablePathNormalizing bool) Option + func WithTLS(certFile, keyFile string) Option + func WithTLSConfig(config *tls.Config) Option + func WithTimeout(d time.Duration) Option + type OptionWS interface + func WithDebug_OptionWS() OptionWS + func WithDialer_OptionWS(dialer *websocket.Dialer) OptionWS + func WithForwardHeadersHandlers_OptionWS(handler forwardHeaderHandler) OptionWS + func WithURL_OptionWS(u string) OptionWS + func WithUpgrader_OptionWS(upgrader *websocket.FastHTTPUpgrader) OptionWS + type Pool interface + Close func() + Get func(string) (*ReverseProxy, error) + Len func() int + Put func(*ReverseProxy) error + func NewChanPool(initialCap, maxCap int, factory Factory) (Pool, error) + type Proxier interface + Close func() + Reset func() + ServeHTTP func(ctx *fasthttp.RequestCtx) + SetClient func(addr string) Proxier + type ReverseProxy struct + func NewReverseProxyWith(options ...Option) (*ReverseProxy, error) + func (p *ReverseProxy) Close() + func (p *ReverseProxy) Reset() + func (p *ReverseProxy) ServeHTTP(ctx *fasthttp.RequestCtx) + func (p *ReverseProxy) SetClient(addr string) *ReverseProxy + type W interface + Weight func() int + type WSReverseProxy struct + func NewWSReverseProxyWith(options ...OptionWS) (*WSReverseProxy, error) + func (w *WSReverseProxy) ServeHTTP(ctx *fasthttp.RequestCtx) + type Weight uint + func (w Weight) Weight() int