August 2019
Beginner to intermediate
798 pages
17h 2m
English
The definition of the http.Transport structure, which can be found in https://golang.org/src/net/http/transport.go, is as follows:
type Transport struct { idleMu sync.Mutex wantIdle bool idleConn map[connectMethodKey][]*persistConn idleConnCh map[connectMethodKey]chan *persistConn idleLRU connLRU reqMu sync.Mutex reqCanceler map[*Request]func(error) altMu sync.Mutex altProto atomic.Value Proxy func(*Request) (*url.URL, error) DialContext func(ctx context.Context, network, addr string) (net.Conn, error) Dial func(network, addr string) (net.Conn, error) DialTLS func(network, addr string) (net.Conn, error) TLSClientConfig *tls.Config TLSHandshakeTimeout time.Duration DisableKeepAlives bool DisableCompression bool MaxIdleConns ...Read now
Unlock full access