client

package
v0.0.62 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) (*http.Client, error)

Types

type Option

type Option func(*transport) error

func WithBackoffOpts

func WithBackoffOpts(opts ...backoff.Option) Option

func WithDialContext

func WithDialContext(dx func(ctx context.Context, network, addr string) (net.Conn, error)) Option

func WithEnableCompression

func WithEnableCompression(enable bool) Option

func WithEnableKeepAlives

func WithEnableKeepAlives(enable bool) Option

func WithExpectContinueTimeout

func WithExpectContinueTimeout(dur string) Option

func WithForceAttemptHTTP2

func WithForceAttemptHTTP2(force bool) Option

func WithIdleConnTimeout

func WithIdleConnTimeout(dur string) Option

func WithMaxConnsPerHost

func WithMaxConnsPerHost(cn int) Option

func WithMaxIdleConns

func WithMaxIdleConns(cn int) Option

func WithMaxIdleConnsPerHost

func WithMaxIdleConnsPerHost(cn int) Option

func WithMaxResponseHeaderBytes

func WithMaxResponseHeaderBytes(bs int64) Option

func WithProxy

func WithProxy(px func(*http.Request) (*url.URL, error)) Option

func WithProxyConnectHeader

func WithProxyConnectHeader(header http.Header) Option

func WithReadBufferSize

func WithReadBufferSize(bs int64) Option

func WithResponseHeaderTimeout

func WithResponseHeaderTimeout(dur string) Option

func WithTLSHandshakeTimeout

func WithTLSHandshakeTimeout(dur string) Option

func WithWriteBufferSize

func WithWriteBufferSize(bs int64) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL