Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewReadCloserWithContextCancelFunc ¶ added in v1.5.0
func NewReadCloserWithContextCancelFunc(readCloser io.ReadCloser, cancel context.CancelFunc) io.ReadCloser
Types ¶
type ReadCloserWithContextCancelFunc ¶ added in v1.5.0
type ReadCloserWithContextCancelFunc struct { io.ReadCloser // contains filtered or unexported fields }
ReadCloserWithContextCancelFunc helps with cancelling the context when closing a ReadCloser. NOTE: The consumer of ReadCloserWithContextCancelFunc should always call the Close method when it is done reading which otherwise could cause a resource leak.
func (ReadCloserWithContextCancelFunc) Close ¶ added in v1.5.0
func (r ReadCloserWithContextCancelFunc) Close() error
Click to show internal directories.
Click to hide internal directories.