Documentation ¶
Index ¶
- func CloseReaders(readers []Reader) error
- func Copy(dst Writer, src Reader) error
- func CopyWithContext(ctx context.Context, dst Writer, src Reader) error
- func Extension(format string) string
- func NopCloser(w io.Writer) io.WriteCloser
- type Combiner
- type Counter
- type Mapper
- type Peeker
- type ReadCloser
- type Reader
- type WriteCloser
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseReaders ¶
Types ¶
type Combiner ¶
type Combiner struct {
// contains filtered or unexported fields
}
A Combiner is a Reader that returns records by reading from multiple Readers.
type Counter ¶
type Counter struct { Reader // contains filtered or unexported fields }
Counter wraps a zio.Reader and provides a method to return the number of records read from the stream.
func NewCounter ¶
NewCounter provides a wrapper for Reader that tracks the number of records read in the variable pointed to by p. Atomic operations are carrried out on the count so the caller should use package atomic to read the referenced count while there is potential concurrency.
type Peeker ¶
type Peeker struct { Reader // contains filtered or unexported fields }
Peeker wraps a Stream while adding a Peek method, which allows inspection of the next item to be read without actually reading it.
type ReadCloser ¶
func NewReadCloser ¶
func NewReadCloser(r Reader, c io.Closer) ReadCloser
func NopReadCloser ¶
func NopReadCloser(r Reader) ReadCloser
type Reader ¶
Reader wraps the Read method.
Read returns the next value and a nil error, a nil value and the next error, or a nil value and nil error to indicate that no values remain.
Read never returns a non-nil value and non-nil error together, and it never returns io.EOF.
Implementations retain ownership of val and val.Bytes, and a subsequent Read may overwrite them. Clients that wish to use val or val.Bytes after the next Read must make a copy.
func ConcatReader ¶
ConcatReader returns a Reader that is the logical concatenation of readers, which are read sequentially. Its Read methed returns any non-nil error returned by a reader and returns end of stream after all readers have returned end of stream.
type WriteCloser ¶
Directories ¶
Path | Synopsis |
---|---|
Package zngio provides an API for reading and writing zng values and directives in binary zng format.
|
Package zngio provides an API for reading and writing zng values and directives in binary zng format. |