Documentation
¶
Index ¶
- Variables
- func Hash(backends []*ReverseProxyBackend) (*reverseHash, error)
- func Least(backends []*ReverseProxyBackend) (*reverseLeast, error)
- func Random(backends []*ReverseProxyBackend) (*reverseRandom, error)
- func RoundRobin(backends []*ReverseProxyBackend) (*reverseRoundRobin, error)
- type Balancer
- type ReverseProxyBackend
- type Server
- type Transport
- type TransportOpt
Constants ¶
This section is empty.
Variables ¶
View Source
var NextProtos = []string{http2.NextProtoTLS}
Functions ¶
func Hash ¶
func Hash(backends []*ReverseProxyBackend) (*reverseHash, error)
func Least ¶
func Least(backends []*ReverseProxyBackend) (*reverseLeast, error)
func Random ¶
func Random(backends []*ReverseProxyBackend) (*reverseRandom, error)
func RoundRobin ¶
func RoundRobin(backends []*ReverseProxyBackend) (*reverseRoundRobin, error)
Types ¶
type ReverseProxyBackend ¶
type ReverseProxyBackend struct { Weight int Count int64 // contains filtered or unexported fields }
func NewReverseProxyBackend ¶
func NewReverseProxyBackend(rawBack string, target *url.URL, weight int, transport http.RoundTripper) *ReverseProxyBackend
func (*ReverseProxyBackend) ServeHTTP ¶
func (this *ReverseProxyBackend) ServeHTTP(rw http.ResponseWriter, req *http.Request)
func (*ReverseProxyBackend) String ¶
func (this *ReverseProxyBackend) String() string
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
func NewTransport ¶
func NewTransport(opt TransportOpt) *Transport
Click to show internal directories.
Click to hide internal directories.