Documentation
¶
Index ¶
- Variables
- func CopyPuller(w zio.Writer, p Puller) error
- func NamedScanner(s Scanner, name string) *namedScanner
- func NewCompareFn(layout order.Layout) expr.CompareFn
- func PullerReader(p Puller) zio.Reader
- func ScannerNopCloser(s Scanner) *nopCloser
- func WriteBatch(zw zio.Writer, batch Batch) error
- type Array
- type Batch
- type File
- type Filter
- type Merger
- type MultiStats
- type Puller
- type PullerCloser
- type Scanner
- type ScannerAble
- type ScannerCloser
- type ScannerStats
- type Statser
Constants ¶
This section is empty.
Variables ¶
var ScannerBatchSize = 100
Functions ¶
func NamedScanner ¶
func PullerReader ¶
func ScannerNopCloser ¶
func ScannerNopCloser(s Scanner) *nopCloser
Types ¶
type Array ¶
Array is a slice of of records that implements the Batch and the Reader interfaces.
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 Merger ¶
type Merger struct {
// contains filtered or unexported fields
}
A Merger merges multiple upstream Pullers into one downstream Puller. If the input streams are ordered according to the configured comparison, the output of Merger will have the same order. Each parent puller is run in its own goroutine so that deadlock is avoided when the upstream pullers would otherwise block waiting for an adjacent puller to finish but the Merger is waiting on the upstream puller.
type MultiStats ¶
type MultiStats []Scanner
func (MultiStats) Stats ¶
func (m MultiStats) Stats() ScannerStats
type Puller ¶
A Puller produces Batches of records, signaling end-of-stream by returning a nil Batch and nil error.
type PullerCloser ¶
type ScannerAble ¶
ScannerAble is implemented by Readers that provide an optimized implementation of the Scanner interface.
type ScannerCloser ¶
type ScannerStats ¶
type ScannerStats 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"`
}
ScannerStats holds Scanner statistics.
func (*ScannerStats) Add ¶
func (s *ScannerStats) Add(in ScannerStats)
Add updates its receiver by adding to it the values in ss.
func (*ScannerStats) Copy ¶
func (s *ScannerStats) Copy() ScannerStats
type Statser ¶
type Statser interface {
Stats() ScannerStats
}
A Statser produces scanner statistics.