Documentation ¶
Overview ¶
Package proxy of reverse handler based fasthttp this lib ref to: Issue: https://github.com/valyala/fasthttp/issues/64 Code: https://golang.org/src/net/http/httputil/reverseproxy.go Pool Ref: https://github.com/fatih/pool/blob/master/channel.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory func(string) (*ReverseProxy, error)
Factory the generator to creat ReverseProxy
type Pool ¶
type Pool interface { // Get returns a new ReverseProxy from the pool. Get(string) (*ReverseProxy, error) // Put Reseting the ReverseProxy puts it back to the Pool. Put(*ReverseProxy) error // Close closes the pool and all its connections. After Close() the pool is // no longer usable. Close() // Len returns the current number of connections of the pool. Len() int }
Pool interface ... this interface ref to: https://github.com/fatih/pool/blob/master/pool.go
type ReverseProxy ¶
type ReverseProxy struct {
// contains filtered or unexported fields
}
ReverseProxy reverse handler using fasthttp.HostClient
func (*ReverseProxy) ServeHTTP ¶
func (p *ReverseProxy) ServeHTTP(ctx *fasthttp.RequestCtx)
ServeHTTP ReverseProxy to serve ref to: https://golang.org/src/net/http/httputil/reverseproxy.go#L169
func (*ReverseProxy) SetClient ¶
func (p *ReverseProxy) SetClient(addr string) *ReverseProxy
SetClient ...
Click to show internal directories.
Click to hide internal directories.