Documentation ¶
Overview ¶
Package oakclient provides a secure HTTP client.
Index ¶
- func New(withOptions ...Option) (*http.Client, error)
- type Option
- func WithDefaultOptions() Option
- func WithExpectContinueTimeout(d time.Duration) Option
- func WithKeepAlive(d time.Duration) Option
- func WithMaxConnsPerHost(n int) Option
- func WithMaxIdleConnsPerHost(n int) Option
- func WithResponseHeaderTimeout(d time.Duration) Option
- func WithTLSHandshakeTimeout(d time.Duration) Option
- func WithTimeout(d time.Duration) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*options) error
func WithDefaultOptions ¶
func WithDefaultOptions() Option
WithDefaultOptions sets any unset Option to its default value. The default values are optimized for a typical secure remote procedure calls.
func WithExpectContinueTimeout ¶
WithExpectContinueTimeout sets http.Transport.ExpectContinueTimeout.
func WithKeepAlive ¶
WithKeepAlive sets net.Dialer.KeepAlive.
func WithMaxConnsPerHost ¶
WithMaxConnsPerHost sets http.Transport.MaxConnsPerHost.
func WithMaxIdleConnsPerHost ¶
WithMaxIdleConnsPerHost sets http.Transport.MaxIdleConnsPerHost.
func WithResponseHeaderTimeout ¶
WithResponseHeaderTimeout sets http.Transport.ResponseHeaderTimeout.
func WithTLSHandshakeTimeout ¶
WithTLSHandshakeTimeout sets http.Transport.TLSHandshakeTimeout.
func WithTimeout ¶
WithTimeout sets http.Client.Timeout and net.Dialer.Timeout.
Click to show internal directories.
Click to hide internal directories.