package
module
Version:
v0.0.0-...-8ac04dd
Opens a new window with list of versions in this module.
Published: Nov 3, 2016
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 2
Opens a new window with list of known importers.
Documentation
¶
buffer is an io.ReadWriteCloser backed by a fixed size buffer.
It never allocates, but moves old data as new data is written.
Close marks the buffer as closed. Future calls to Write will
return an error. Future calls to Read, once the buffer is
empty, will return err.
Len returns the number of bytes of the unread portion of the buffer.
Read copies bytes from the buffer into p.
It is an error to read when no data is available.
Write copies bytes from p into the buffer.
It is an error to write more data than the buffer can hold.
func NewBufferedPipe(size int) *Pipe
Read waits until data is available and copies bytes
from the buffer into p.
Write copies bytes from p into the buffer and wakes a reader.
It is an error to write more data than the buffer can hold.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.