package
0.3.0-alpha
Repository: https://github.com/trustifierlabs/capsule8.git
Documentation: pkg.go.dev
# Functions
Buffer stores up to the given number of elements from the input Stream before blocking.
Chargen creates a generator that produces a stream of single-character strings from a pattern reminiscent of RFC864 chargen TCP/UDP services.
Copy duplicates elements from the input stream into the given number of output streams.
Do adds an operator in the stream that calls the given function for every element.
Filter adds a filter to a stream.
ForEach adds a terminator onto the stream that consumes each element and runs the given function on them.
Iota creates a generator that produces the given count of int elements (or infinite, if not specified).
Join combines multiple input Streams into a single output Stream.
Limit limits the number of results returned.
Map adds an operator in the stream that calls the given function for every element and forwards along the returned value.
NewJoiner creates a controllable joiner for the given stream.
NewRepeater creates a controllable repeater for the given stream.
Null creates a generator that doesn't create any output elements.
OnOffValve adds a simple on/off valve operator onto the stream.
Overflow drops elements instead of blocking on the output Stream.
Reduce adds a terminator onto the stream that accumulates a value using the given function and then returns it once the input stream terminates.
Split splits the input stream by the given filter function.
Tee copies the input stream to a pair of output streams (like a T-shaped junction).
Throttle limits the number of events emitted by the stream.
Ticker creates a generator that produces a time.Time element every 'tick' of the specified duration.
Wait adds a terminator onto the stream that throws away all elements and just waits for stream termination.
# Structs
Joiner is a construct that combines multiple input streams into a single output stream.
Repeater is a stream that repeats elements from one input to multiple output streams.
Stream represents a stream consisting of a generator, zero or more operators, and zero or one terminators.
# Type aliases
DoFunc is the signature of a function that is called by Do.
FilterFunc is the signature of a function that is called by Filter.
MapFunc is the signature of a function that is called by Map.
ReduceFunc is the signature of a function called by Reduce.