Documentation ¶
Index ¶
- func NewHTTP2Client(timeout time.Duration, tlsConf *tls.Config) (*http.Client, error)
- func NewHTTP2Transporter(timeout time.Duration, tlsConf *tls.Config) (*http.Transport, error)
- func NewHTTPClient(timeout time.Duration, tlsConf *tls.Config) *http.Client
- func NewTransporter(timeout time.Duration, tlsConf *tls.Config) *http.Transport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTP2Client ¶
NewHTTP2Client provides you with an http2 client that is configured with the NewTransporter.
func NewHTTP2Transporter ¶
NewHTTP2Transporter is the same as NewTransporter but also configures it for HTTP2 connections.
func NewHTTPClient ¶
NewHTTPClient provides you with an http client that is configured with the NewTransporter.
func NewTransporter ¶
NewTransporter configures a transporter that ensures you are never stuck in an infinite timeout and ensures that you don't leak connections. For example, your connection can get stuck in Dial forever even if you have a client timeout set, so this transport ensures that never happens.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.