Documentation
¶
Overview ¶
Package zngio provides an API for reading and writing zng values and directives in binary zng format. The Reader and Writer types implement the the zio.Reader and zio.Writer interfaces. Since these methods read and write only zed.Records, but the zng format includes additional functionality, other methods are available to read/write zng comments and include virtual channel numbers in the stream. Virtual channels provide a way to indicate which output of a flowgraph a result came from when a flowgraph computes multiple output channels. The zng values in this zng value are "machine format" as prescirbed by the ZNG spec. The vanilla zio.Reader and zio.Writer implementations ignore application-specific payloads (e.g., channel encodings).
Index ¶
- Constants
- type AppMessage
- type Encoder
- type Reader
- func (r *Reader) LastSOS() int64
- func (r *Reader) NewScanner(ctx context.Context, filter zbuf.Filter) (zbuf.Scanner, error)
- func (r *Reader) Position() int64
- func (r *Reader) Read() (*zed.Value, error)
- func (r *Reader) ReadByte() (byte, error)
- func (r *Reader) ReadPayload() (*zed.Value, *AppMessage, error)
- func (r *Reader) SkipStream() (*zed.Value, int64, error)
- type ReaderOpts
- type Writer
- type WriterOpts
Constants ¶
const ( ReadSize = 512 * 1024 MaxSize = 10 * 1024 * 1024 TypeLimit = 10000 )
const (
// DefaultLZ4BlockSize is a reasonable default for WriterOpts.LZ4BlockSize.
DefaultLZ4BlockSize = 16 * 1024
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppMessage ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func NewEncoder ¶
func NewEncoder() *Encoder
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func NewReaderWithOpts ¶
func (*Reader) NewScanner ¶
func (*Reader) ReadPayload ¶
func (r *Reader) ReadPayload() (*zed.Value, *AppMessage, error)
type ReaderOpts ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func NewWriter ¶
func NewWriter(w io.WriteCloser, opts WriterOpts) *Writer
type WriterOpts ¶
type WriterOpts struct {
LZ4BlockSize int
}