Documentation
¶
Overview ¶
Package procreader provides a ProcReader object that implements the io.Reader interface and generates its data from a user-specified callback function.
Use the New function to create a new ProcReader and pass it a callback function that is invoked to create new data when the ProcReader's buffers are empty.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callback ¶
Callback is a callback function that generates data in the form of a slice of bytes. Size is a hint as to how much data is requested. If the callback returns more data, the excess will be buffered by the reader for subsequent Read calls. If no data is left, the Callback function must returns an io.EOF error.
type ProcReader ¶
type ProcReader struct {
// contains filtered or unexported fields
}
ProcReader is a procedural reader that generates its data from a callback function.