Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Dial func() (net.Conn, error) MaxConns int MaxIdleConnDuration time.Duration MaxIdempotentCallAttempts int ReadBufferSize int WriteBufferSize int ReadTimeout time.Duration WriteTimeout time.Duration MaxConnWaitTimeout time.Duration // contains filtered or unexported fields }
func (*Client) RoundTrip ¶
RoundTrip does an HTTP/1.1 RoundTrip as quickly as possible and handles streaming the data with as few copies as possible.
It's important to note that the returned *bytebufferpool.ByteBuffer will always be nil if an error is returned. This means if the returning function returns an error, we do not need to recycle the bytebuffer pool.
It should also be noted that the *bytebufferpool.ByteBuffer will be filled in asynchronously when the response is written to an io.Writer (like a net.Conn) or when res.Body() is called.
Click to show internal directories.
Click to hide internal directories.