op

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const BatchLen = 100

Variables

This section is empty.

Functions

func NewApplier

func NewApplier(rctx *runtime.Context, parent zbuf.Puller, expr expr.Evaluator) *applier

func Unwrap

func Unwrap(batch zbuf.Batch) (zbuf.Batch, int)

Types

type Catcher

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

Catcher wraps an Interface with a Pull method that recovers panics and turns them into errors. It should be wrapped around the output puller of a flowgraph and the top-level puller of any goroutine created inside of a flowgraph.

func NewCatcher

func NewCatcher(parent zbuf.Puller) *Catcher

func (*Catcher) Pull

func (c *Catcher) Pull(done bool) (b zbuf.Batch, err error)

type EndOfChannel

type EndOfChannel int

EndOfChannel is an empty batch that represents the termination of one of the output paths of a muxed flowgraph and thus will be ignored downstream unless explicitly detected.

func (*EndOfChannel) Ref

func (*EndOfChannel) Ref()

func (*EndOfChannel) Unref

func (*EndOfChannel) Unref()

func (*EndOfChannel) Values

func (*EndOfChannel) Values() []zed.Value

func (*EndOfChannel) Vars

func (*EndOfChannel) Vars() []zed.Value

type Mux

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

Mux implements the muxing of a set of parallel paths at the output of a flowgraph. It also implements the double-EOS algorithm with proc.Latch to detect the end of each parallel stream. Its output protocol is a single EOS when all of the upstream legs are done at which time it cancels the flowgraoh. Each batch returned by the mux is wrapped in a Batch, which can be unwrappd with Unwrap to extract the integer index of the output (in left-to-right DFS traversal order of the flowgraph). This proc requires more than one parent; use proc.Latcher for a single-output flowgraph.

func NewMux

func NewMux(rctx *runtime.Context, parents []zbuf.Puller) *Mux

func (*Mux) Pull

func (m *Mux) Pull(bool) (zbuf.Batch, error)

Pull implements the merge logic for returning data from the upstreams.

type Result

type Result struct {
	Batch zbuf.Batch
	Err   error
}

Result is a convenient way to bundle the result of Proc.Pull() to send over channels.

type Router

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

func NewRouter

func NewRouter(ctx context.Context, parent zbuf.Puller) *Router

func (*Router) AddRoute

func (r *Router) AddRoute() zbuf.Puller
func (r *Router) Link(s Selector)

func (*Router) Send

func (r *Router) Send(p zbuf.Puller, b zbuf.Batch, err error) bool

type Selector

type Selector interface {
	Forward(*Router, zbuf.Batch) bool
}

type Single

type Single struct {
	zbuf.Puller
	// contains filtered or unexported fields
}

func NewSingle

func NewSingle(parent zbuf.Puller) *Single

func (*Single) Pull

func (s *Single) Pull(bool) (zbuf.Batch, error)

Directories

Path Synopsis
A combine proc merges multiple upstream inputs into one output.
A combine proc merges multiple upstream inputs into one output.

Jump to

Keyboard shortcuts

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