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 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.