Documentation ¶
Index ¶
- Constants
- Variables
- func CopyPuller(w zio.Writer, p Puller) error
- func CopyVars(b Batch) []zed.Value
- func NamedScanner(s Scanner, name string) *namedScanner
- func NewComparator(zctx *zed.Context, layout order.Layout) *expr.Comparator
- func NewComparatorNullsMax(zctx *zed.Context, layout order.Layout) *expr.Comparator
- func NoControl(r zio.Reader) *noControl
- func PullerReader(p Puller) zio.Reader
- func WriteBatch(zw zio.Writer, batch Batch) error
- type Array
- func (a *Array) Append(r *zed.Value)
- func (*Array) CopyValue(val *zed.Value) *zed.Value
- func (a Array) NewReader() zio.Reader
- func (*Array) NewValue(typ zed.Type, bytes zcode.Bytes) *zed.Value
- func (a *Array) Read() (*zed.Value, error)
- func (a *Array) Ref()
- func (a *Array) Unref()
- func (a *Array) Values() []zed.Value
- func (a *Array) Vars() []zed.Value
- func (a *Array) Write(r *zed.Value) error
- type Batch
- type Control
- type EndChannel
- type File
- type Filter
- type Meter
- type MultiStats
- type Progress
- type ProgressReadCloser
- type ProgressReader
- type Puller
- type Scanner
- type ScannerAble
- type SetChannel
Constants ¶
const PullerBatchBytes = 512 * 1024
PullerBatchBytes is the maximum number of bytes (in the zed.Value.Byte sense) per batch for a Puller created by NewPuller.
Variables ¶
var PullerBatchSize = 100
PullerBatchSize is the maximum number of values per batch for a Puller created by NewPuller.
Functions ¶
func NamedScanner ¶
func NewComparator ¶ added in v1.0.0
func NewComparatorNullsMax ¶ added in v1.6.0
func PullerReader ¶
Types ¶
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
Array is a slice of of records that implements the Batch and the Reader interfaces.
func NewArray ¶ added in v1.0.0
XXX this should take the frame arg too and the procs that create new arrays need to propagate their frames downstream.
type Batch ¶
Batch is an interface to a bundle of values. Reference counting allows efficient, safe reuse in concert with sharing across goroutines.
A newly obtained Batch always has a reference count of one. The Batch owns its values and their storage, and an implementation may reuse this memory when the reference count falls to zero, reducing load on the garbage collector.
To promote reuse, a goroutine should release a Batch reference when possible, but care must be taken to avoid race conditions that arise from releasing a reference too soon. Specifically, a goroutine obtaining a value from a Batch must retain its Batch reference for as long as it retains the value, and the goroutine must not use the value after releasing its reference.
Regardless of reference count or implementation, an unreachable Batch will eventually be reclaimed by the garbage collector.
type EndChannel ¶ added in v1.0.0
type EndChannel int
type Meter ¶ added in v1.0.0
type Meter interface {
Progress() Progress
}
A Meter provides Progress statistics.
type MultiStats ¶
type MultiStats []Scanner
func (MultiStats) Progress ¶ added in v1.0.0
func (m MultiStats) Progress() Progress
type Progress ¶ added in v1.0.0
type Progress struct { BytesRead int64 `zed:"bytes_read" json:"bytes_read"` BytesMatched int64 `zed:"bytes_matched" json:"bytes_matched"` RecordsRead int64 `zed:"records_read" json:"records_read"` RecordsMatched int64 `zed:"records_matched" json:"records_matched"` }
Progress represents progress statistics from a Scanner.
type ProgressReadCloser ¶ added in v1.0.0
type ProgressReadCloser interface { zio.ReadCloser Progress() Progress }
func MeterReadCloser ¶ added in v1.0.0
func MeterReadCloser(rc zio.ReadCloser) ProgressReadCloser
type ProgressReader ¶ added in v1.0.0
type Puller ¶
A Puller produces Batches of records, signaling end-of-stream (EOS) by returning a nil Batch and nil error. The done argument to Pull indicates that the stream should be terminated before its natural EOS. An implementation must return EOS in response to a Pull call when the done parameter is true. After seeing EOS, (either via done or its natural end), an implementation of an operator that processes pulled data should respond to additional calls to Pull as if restarting in its initial state. For original sources of data (e.g., the from operator), once EOS is reached, additional calls to Pull after the first EOS should always return EOS. Pull is not safe to call concurrently.
func NewPuller ¶
NewPuller returns a puller for zr that returns batches containing up to PullerBatchBytes bytes and PullerBatchSize values.
type Scanner ¶
A Scanner is a Batch source that also provides progress updates.
func MultiScanner ¶ added in v1.3.0
type ScannerAble ¶
ScannerAble is implemented by Readers that provide an optimized implementation of the Scanner interface.
type SetChannel ¶ added in v1.0.0
type SetChannel int