Documentation
¶
Index ¶
- func GetConfig[C any](ctx context.Context) C
- func WithConfig(ctx context.Context, cfg any) context.Context
- type Aggregation
- type Aggregator
- type Chain
- type CompareFunc
- type Condition
- type Exploder
- type ExploderFactory
- type Filter
- type GAggregation
- type GAggregator
- type GExploder
- type GExploderFactory
- type GFilter
- type GMapper
- type Mapper
- type Step
- func AggregationStep(m Aggregator, name ...string) Step
- func ConditionalStep(m Condition, n Chain, name ...string) Step
- func ExplodeStep(m Exploder, name ...string) Step
- func ExplodeStepByFactory(m ExploderFactory, name ...string) Step
- func FilterStep(m Filter, name ...string) Step
- func MappingStep(m Mapper, name ...string) Step
- func ParallelStep(n Chain, pool processing.Processing, name ...string) Step
- func SequentialStep(n Chain, name ...string) Step
- func SortStep(m CompareFunc, name ...string) Step
- func StableStep(n Chain, pool processing.Processing, name ...string) Step
- func TransformStep(m Transformer, name ...string) Step
- type Transformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Aggregation ¶
type Aggregation = GAggregation[any, any]
Aggregation represents a generic interface for performing incremental aggregation over input elements. The Aggregate method processes input elements and optionally finalizes aggregation for the current input batch. The Finish method finalizes and retrieves still pending aggregated results.
type Aggregator ¶
type Aggregator = GAggregator[any, any]
Aggregator is a factory function creating an aggregation object. The generated object typically has its own local state to process the aggregation.
type Chain ¶
type Chain interface {
Map(Mapper, ...string) Chain
Explode(Exploder, ...string) Chain
ExplodeByFactory(ExploderFactory, ...string) Chain
Filter(Filter, ...string) Chain
Sort(CompareFunc, ...string) Chain
Transform(Transformer, ...string) Chain
Aggregate(Aggregator, ...string) Chain
Sequential(untypedChain Chain, name ...string) Chain
Parallel(untypedChain Chain, processing processing.Processing, name ...string) Chain
Stable(untypedChain Chain, processing processing.Processing, name ...string) Chain
Conditional(c Condition, untypedChain Chain, name ...string) Chain
Add(n Chain, name ...string) Chain
Step(s Step) Chain
Execute(ctx context.Context, seq iter.Seq[any], name ...string) iter.Seq[any]
ExecuteWithConfig(ctx context.Context, cfg any, seq iter.Seq[any], name ...string) iter.Seq[any]
// contains filtered or unexported methods
}
type CompareFunc ¶
type ExploderFactory ¶
type ExploderFactory = GExploderFactory[any, any]
type GAggregation ¶
type GAggregation[I, O any] interface { // Aggregate consumes one element and optionally provides a set of new // elements based on the previously consumed set of elements. If called // in a parallel chain, the implementation must potentially be synchronized. Aggregate(I) []O // Finish must finally provide new elements based on the actual internal // state. It is called, after the last element has been propagated. Finish() []O }
type GAggregator ¶
type GAggregator[I, O any] = func() GAggregation[I, O]
type GExploderFactory ¶
func GExploderFactoryFor ¶
func GExploderFactoryFor[I, O any](e GExploder[I, O]) GExploderFactory[I, O]
type Step ¶
type Step interface {
String() string
GetName() string
Renamed(name string) Step
// contains filtered or unexported methods
}
func AggregationStep ¶
func AggregationStep(m Aggregator, name ...string) Step
func ExplodeStep ¶
func ExplodeStepByFactory ¶
func ExplodeStepByFactory(m ExploderFactory, name ...string) Step
func FilterStep ¶
func MappingStep ¶
func ParallelStep ¶
func ParallelStep(n Chain, pool processing.Processing, name ...string) Step
func SequentialStep ¶
func SortStep ¶
func SortStep(m CompareFunc, name ...string) Step
func StableStep ¶
func StableStep(n Chain, pool processing.Processing, name ...string) Step
func TransformStep ¶
func TransformStep(m Transformer, name ...string) Step
type Transformer ¶
Click to show internal directories.
Click to hide internal directories.