Documentation ¶
Index ¶
Constants ¶
const BatchLen = 100
Variables ¶
This section is empty.
Functions ¶
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 ¶
type Context ¶
type Context struct { context.Context Logger *zap.Logger // WaitGroup is used to ensure that goroutines complete cleanup work // (e.g., removing temporary files) before Cancel returns. WaitGroup sync.WaitGroup Zctx *zed.Context // contains filtered or unexported fields }
Context provides states used by all procs to provide the outside context in which they are running.
func DefaultContext ¶
func DefaultContext() *Context
func NewContext ¶
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.