Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterFunc ¶
FilterFunc returns a unary function (api.UnFunc) which applies the user-defined filtering to apply predicates that filters out data items from being included in the downstream. The provided user-defined function must be of type:
func(T)bool - where T is the type of incoming data item, bool is the value of the predicate
When the user-defined function returns false, the current processed data item will not be placed in the downstream processing.
func FlatMapFunc ¶
FlatMapFunc returns an unary function which applies a user-defined function which takes incoming comsite items and deconstruct them into individual items which can then be re-streamed. The type for the user-defined function is:
func (T) R - where R is the original item, R is a slice of decostructed items
The slice returned should be restreamed by placing each item onto the stream for downstream processing.
func MapFunc ¶
MapFunc returns an unary function which applies the user-defined function which maps, one-to-one, the incomfing value to a new value. The user-defined function must be of type:
func(T) R - where T is the incoming item, R is the type of the returned mapped item
func ProcessFunc ¶
ProcessFunc returns a unary function which applies the specified user-defined function that processes data items from upstream and returns a result value. The provided function must be of type:
func(T) R where T is the type of incoming item R the type of returned processed item
Types ¶
type UnaryOperator ¶
type UnaryOperator struct {
// contains filtered or unexported fields
}
UnaryOp is an executor node that can execute a unary operation (i.e. transformation, etc)
func (*UnaryOperator) Exec ¶
func (o *UnaryOperator) Exec(ctx context.Context) (err error)
Exec is the entry point for the executor
func (*UnaryOperator) GetOutput ¶
func (o *UnaryOperator) GetOutput() <-chan interface{}
GetOutput returns the output channel for the executor node
func (*UnaryOperator) SetConcurrency ¶
func (o *UnaryOperator) SetConcurrency(concurr int)
SetConcurrency sets the concurrency level for the operation
func (*UnaryOperator) SetInput ¶
func (o *UnaryOperator) SetInput(in <-chan interface{})
SetInput sets the input channel for the executor node
func (*UnaryOperator) SetOperation ¶
func (o *UnaryOperator) SetOperation(op api.UnOperation)
SetOperation sets the executor operation