Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer interface { io.WriteCloser // NewReader() returns an io.Reader that reads all data // written to the Buffer. NewReader() io.Reader // Close, but return the given error (instead of io.EOF) to // all readers when they reach the end of the buffer. // // CloseWithError(nil) is equivalent to // CloseWithError(io.EOF). CloseWithError(error) error }
A Buffer is an io.Writer that distributes written data asynchronously to multiple concurrent readers.
NewReader() can be called at any time. In all cases, every returned io.Reader reads all data written to the Buffer.
Behavior is undefined if Write is called after Close or CloseWithError.
Click to show internal directories.
Click to hide internal directories.