Documentation ¶
Index ¶
- type HTTPClientBuilder
- func (b HTTPClientBuilder) Build() (*http.Client, error)
- func (b HTTPClientBuilder) ConnectionTimeout(t time.Duration) HTTPClientBuilder
- func (b HTTPClientBuilder) ExpectContinueTimeout(t time.Duration) HTTPClientBuilder
- func (b HTTPClientBuilder) IdleConnTimeout(t time.Duration) HTTPClientBuilder
- func (b HTTPClientBuilder) MaxIdleConn(all, host int) HTTPClientBuilder
- func (b HTTPClientBuilder) ResponseHeaderTimeout(t time.Duration) HTTPClientBuilder
- func (b HTTPClientBuilder) TLSHandshakeTimeout(t time.Duration) HTTPClientBuilder
- func (b HTTPClientBuilder) WithCookies() HTTPClientBuilder
- func (b HTTPClientBuilder) WithHTTP2() HTTPClientBuilder
- func (b HTTPClientBuilder) WithKeepAlive(t time.Duration) HTTPClientBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPClientBuilder ¶
type HTTPClientBuilder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder() HTTPClientBuilder
NewBuilder will return a new builder for the http.Client.
func (HTTPClientBuilder) Build ¶
func (b HTTPClientBuilder) Build() (*http.Client, error)
Build will grab all the builder settings and generate an http.client
func (HTTPClientBuilder) ConnectionTimeout ¶
func (b HTTPClientBuilder) ConnectionTimeout(t time.Duration) HTTPClientBuilder
ConnectionTimeout will set the max amount of time to wait until the TCP connections gets established.
func (HTTPClientBuilder) ExpectContinueTimeout ¶
func (b HTTPClientBuilder) ExpectContinueTimeout(t time.Duration) HTTPClientBuilder
func (HTTPClientBuilder) IdleConnTimeout ¶
func (b HTTPClientBuilder) IdleConnTimeout(t time.Duration) HTTPClientBuilder
func (HTTPClientBuilder) MaxIdleConn ¶
func (b HTTPClientBuilder) MaxIdleConn(all, host int) HTTPClientBuilder
MaxIdleConn will set how many connections are allowed to be on idle in total and per host.
The value of all should be always bigger than host.
func (HTTPClientBuilder) ResponseHeaderTimeout ¶
func (b HTTPClientBuilder) ResponseHeaderTimeout(t time.Duration) HTTPClientBuilder
func (HTTPClientBuilder) TLSHandshakeTimeout ¶
func (b HTTPClientBuilder) TLSHandshakeTimeout(t time.Duration) HTTPClientBuilder
TLSHandshakeTimeout will set the max amount of time to wait until the TSL Handshake get completed.
func (HTTPClientBuilder) WithCookies ¶
func (b HTTPClientBuilder) WithCookies() HTTPClientBuilder
func (HTTPClientBuilder) WithHTTP2 ¶
func (b HTTPClientBuilder) WithHTTP2() HTTPClientBuilder
func (HTTPClientBuilder) WithKeepAlive ¶
func (b HTTPClientBuilder) WithKeepAlive(t time.Duration) HTTPClientBuilder
Click to show internal directories.
Click to hide internal directories.