driver

package
v0.32.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2021 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(ctx context.Context, w zio.Writer, prog ast.Proc, zctx *zed.Context, r zio.Reader, logger *zap.Logger) error

Copy applies a proc to all records from a zio.Reader, writing to a single zio.Writer. The proc must have a single tail.

func RunJoinWithFileSystem

func RunJoinWithFileSystem(ctx context.Context, d Driver, program ast.Proc, zctx *zed.Context, readers []zio.Reader, adaptor proc.DataAdaptor) (zbuf.ScannerStats, error)

func RunWithFileSystem

func RunWithFileSystem(ctx context.Context, d Driver, program ast.Proc, zctx *zed.Context, reader zio.Reader, adaptor proc.DataAdaptor) (zbuf.ScannerStats, error)

func RunWithLake

func RunWithLake(ctx context.Context, d Driver, program ast.Proc, zctx *zed.Context, lake proc.DataAdaptor, head *lakeparse.Commitish) (zbuf.ScannerStats, error)

func RunWithLakeAndStats

func RunWithLakeAndStats(ctx context.Context, d Driver, program ast.Proc, zctx *zed.Context, lake proc.DataAdaptor, head *lakeparse.Commitish, ticker <-chan time.Time, logger *zap.Logger, parallelism int) error

func RunWithOrderedReader

func RunWithOrderedReader(ctx context.Context, d Driver, program ast.Proc, zctx *zed.Context, reader zio.Reader, layout order.Layout, logger *zap.Logger) error

func RunWithReader

func RunWithReader(ctx context.Context, d Driver, program ast.Proc, zctx *zed.Context, reader zio.Reader, logger *zap.Logger) error

Types

type CLI

type CLI struct {
	// contains filtered or unexported fields
}

CLI implements Driver.

func NewCLI

func NewCLI(w ...zio.Writer) *CLI

func (*CLI) ChannelEnd

func (d *CLI) ChannelEnd(int) error

func (*CLI) SetWarningsWriter

func (d *CLI) SetWarningsWriter(w io.Writer)

func (*CLI) Stats

func (d *CLI) Stats(zbuf.ScannerStats) error

func (*CLI) Warn

func (d *CLI) Warn(msg string) error

func (*CLI) Write

func (d *CLI) Write(cid int, batch zbuf.Batch) error

type Driver

type Driver interface {
	Warn(msg string) error
	Write(channelID int, batch zbuf.Batch) error
	ChannelEnd(channelID int) error
	Stats(zbuf.ScannerStats) error
}

type Reader

type Reader struct {
	io.Closer
	// contains filtered or unexported fields
}

Reader implements zio.ReaderCloser and Driver.

func NewReader

func NewReader(ctx context.Context, program ast.Proc, zctx *zed.Context, reader zio.Reader) (*Reader, error)

func (*Reader) ChannelEnd

func (*Reader) ChannelEnd(cid int) error

func (*Reader) Close

func (r *Reader) Close() error

func (*Reader) Read

func (r *Reader) Read() (*zed.Value, error)

func (*Reader) Stats

func (*Reader) Stats(stats zbuf.ScannerStats) error

func (*Reader) Warn

func (*Reader) Warn(warning string) error

func (*Reader) Write

func (r *Reader) Write(_ int, batch zbuf.Batch) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL