Documentation ¶
Index ¶
- func ChanToRawWriter(writer io.Writer, stream <-chan *alloc.Buffer) error
- func ChanToWriter(writer Writer, stream <-chan *alloc.Buffer) error
- func RawReaderToChan(stream chan<- *alloc.Buffer, reader io.Reader) error
- func ReadFrom(reader io.Reader, buffer *alloc.Buffer) (*alloc.Buffer, error)
- func ReaderToChan(stream chan<- *alloc.Buffer, reader Reader) error
- type AdaptiveReader
- type AdaptiveWriter
- type BufferedReader
- type BufferedWriter
- type Reader
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChanToWriter ¶
ChanToWriter dumps all content from a given chan to a writer until the chan is closed.
Types ¶
type AdaptiveReader ¶
type AdaptiveReader struct {
// contains filtered or unexported fields
}
AdaptiveReader is a Reader that adjusts its reading speed automatically.
func NewAdaptiveReader ¶
func NewAdaptiveReader(reader io.Reader) *AdaptiveReader
NewAdaptiveReader creates a new AdaptiveReader.
type AdaptiveWriter ¶
type AdaptiveWriter struct {
// contains filtered or unexported fields
}
AdaptiveWriter is a Writer that writes alloc.Buffer into underlying writer.
func NewAdaptiveWriter ¶
func NewAdaptiveWriter(writer io.Writer) *AdaptiveWriter
NewAdaptiveWriter creates a new AdaptiveWriter.
type BufferedReader ¶
type BufferedReader struct {
// contains filtered or unexported fields
}
func NewBufferedReader ¶
func NewBufferedReader(rawReader io.Reader) *BufferedReader
func (*BufferedReader) Cached ¶
func (this *BufferedReader) Cached() bool
func (*BufferedReader) Release ¶
func (this *BufferedReader) Release()
func (*BufferedReader) SetCached ¶
func (this *BufferedReader) SetCached(cached bool)
type BufferedWriter ¶
type BufferedWriter struct {
// contains filtered or unexported fields
}
func NewBufferedWriter ¶
func NewBufferedWriter(rawWriter io.Writer) *BufferedWriter
func (*BufferedWriter) Cached ¶
func (this *BufferedWriter) Cached() bool
func (*BufferedWriter) Flush ¶
func (this *BufferedWriter) Flush() error
func (*BufferedWriter) Release ¶
func (this *BufferedWriter) Release()
func (*BufferedWriter) SetCached ¶
func (this *BufferedWriter) SetCached(cached bool)
Click to show internal directories.
Click to hide internal directories.