Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultNetworkPool = &NetworkPool{ configMap: make(map[poolKey]*transportLease), transportMap: make(map[*http.Transport]*transportLease), }
DefaultNetworkPool is the global instance managed by the engine layer.
Functions ¶
This section is empty.
Types ¶
type NetworkPool ¶
type NetworkPool struct {
// contains filtered or unexported fields
}
NetworkPool manages shared HTTP transports for TCP connection reuse.
func (*NetworkPool) AcquireTransport ¶
func (p *NetworkPool) AcquireTransport(proxyURL, customDNS string, maxConns int) *http.Transport
AcquireTransport returns a shared transport for the given configuration.
func (*NetworkPool) ReleaseTransport ¶
func (p *NetworkPool) ReleaseTransport(t *http.Transport)
ReleaseTransport marks a specific transport lease as returned.
Click to show internal directories.
Click to hide internal directories.