Documentation
¶
Overview ¶
Package examples demonstrates how copies report data, readiness, and multi-shot completions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyWithErrMore ¶
func CopyWithErrMore() ( firstN int64, firstErr error, secondN int64, secondErr error, thirdN int64, thirdErr error, out string, )
CopyWithErrMore reads three queued chunks through a one-byte copy buffer. The first two copies each return two bytes and iox.ErrMore. The third reaches the end of the input.
func CopyWithPolicy ¶ added in v0.2.0
CopyWithPolicy uses iox.YieldPolicy to wait for readiness and retry iox.ErrWouldBlock within a single copy.
func CopyWithWouldBlock ¶
func CopyWithWouldBlock() (firstN int64, firstErr error, secondN int64, secondErr error, out string)
CopyWithWouldBlock receives a readiness notification after the first copy returns (0, iox.ErrWouldBlock). The second copy transfers "ok".
Types ¶
This section is empty.