Documentation
¶
Overview ¶
Package idle fails a response body whose reads wait too long for data, so that a stream over a connection that hung ends instead of waiting forever. Client.Stream puts the timeout on the context; the HTTP client of every provider watches the bodies of responses to requests that carry one.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Watch ¶
func Watch(body io.ReadCloser, timeout time.Duration) io.ReadCloser
Watch returns body, closed once a read has waited timeout for data; that read and every later one then fail. Only waiting counts: a consumer slow to read is not idle.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.