Documentation ¶
Overview ¶
Package fshttp contains the common http parts of the config, Transport and Client
Index ¶
- func NewClient(ci *fs.ConfigInfo) *http.Client
- func NewDialer(ci *fs.ConfigInfo) *net.Dialer
- func NewTransport(ci *fs.ConfigInfo) http.RoundTripper
- func NewTransportCustom(ci *fs.ConfigInfo, customize func(*http.Transport)) http.RoundTripper
- func ResetTransport()
- func StartHTTPTokenBucket()
- type Transport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(ci *fs.ConfigInfo) *http.Client
NewClient returns an http.Client with the correct timeouts
func NewDialer ¶
func NewDialer(ci *fs.ConfigInfo) *net.Dialer
NewDialer creates a net.Dialer structure with Timeout, Keepalive and LocalAddr set from rclone flags.
func NewTransport ¶
func NewTransport(ci *fs.ConfigInfo) http.RoundTripper
NewTransport returns an http.RoundTripper with the correct timeouts
func NewTransportCustom ¶ added in v1.50.0
func NewTransportCustom(ci *fs.ConfigInfo, customize func(*http.Transport)) http.RoundTripper
NewTransportCustom returns an http.RoundTripper with the correct timeouts. The customize function is called if set to give the caller an opportunity to customize any defaults in the Transport.
func ResetTransport ¶
func ResetTransport()
ResetTransport resets the existing transport, allowing it to take new settings. Should only be used for testing.
func StartHTTPTokenBucket ¶
func StartHTTPTokenBucket()
StartHTTPTokenBucket starts the token bucket if necessary