Documentation
¶
Overview ¶
Package timeout provides a http.RoundTripper which injects a fixed timeout into each request.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transport ¶
type Transport struct {
// Transport is the underlying http.RoundTripper used to perform requests.
// If nil, http.DefaultTransport is used.
Transport http.RoundTripper
// Timeout is the maximum duration allowed for the round trip, starting
// when RoundTrip is called and ending only once the response body is closed.
Timeout time.Duration
}
Transport wraps another http.RoundTripper, bounding the entire round trip (including reading the response body) to a fixed Timeout via the request's context.
Click to show internal directories.
Click to hide internal directories.