Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewReader ¶
NewReader wraps an io.Reader to handle context cancellation.
Context state is checked BEFORE every Read.
func NewResponseWriter ¶
func NewResponseWriter(ctx context.Context, w http.ResponseWriter) http.ResponseWriter
NewResponseWriter wraps an http.ResponseWriter to handle context cancellation.
Context state is checked BEFORE every Write.
The returned ResponseWriter also implements io.ReaderFrom to allow io.Copy to select the best strategy while still checking the context state before every chunk transfer.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.