Documentation ¶
Overview ¶
Package streaming contains helpers for streaming IO operations and progress reporting.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRequestProgress ¶
func NewRequestProgress(body io.ReadSeekCloser, pr func(bytesTransferred int64)) io.ReadSeekCloser
NewRequestProgress adds progress reporting to an HTTP request's body stream.
func NewResponseProgress ¶
func NewResponseProgress(body io.ReadCloser, pr func(bytesTransferred int64)) io.ReadCloser
NewResponseProgress adds progress reporting to an HTTP response's body stream.
func NopCloser ¶
func NopCloser(rs io.ReadSeeker) io.ReadSeekCloser
NopCloser returns a ReadSeekCloser with a no-op close method wrapping the provided io.ReadSeeker. In addition to adding a Close method to an io.ReadSeeker, this can also be used to wrap an io.ReadSeekCloser with a no-op Close method to allow explicit control of when the io.ReedSeekCloser has its underlying stream closed.
Types ¶
type MultipartContent ¶
type MultipartContent struct { // Body contains the required content body. Body io.ReadSeekCloser // ContentType optionally specifies the HTTP Content-Type for this Body. // The default value is application/octet-stream. ContentType string // Filename optionally specifies the filename for this Body. // The default value is the field name for the multipart/form section. Filename string }
MultipartContent contains streaming content used in multipart/form payloads.
Click to show internal directories.
Click to hide internal directories.