Documentation
¶
Index ¶
- func ConvertAggregator[NI, NO, I, O any](in Aggregator[I, O]) internal.GAggregator[NI, NO]
- func ConvertExploder[NI, NO, I, O any](m Exploder[I, O]) internal.GExploder[NI, NO]
- func ConvertExploderFactory[NI, NO, I, O any](m ExploderFactory[I, O]) internal.GExploderFactory[NI, NO]
- func ConvertFilter[N, I any](m Filter[I]) internal.GFilter[N]
- func ConvertMapper[NI, NO, I, O any](m Mapper[I, O]) internal.GMapper[NI, NO]
- type Aggregation
- type Aggregator
- type Chain
- func AddAggregation[N, I, O any](base Chain[I, O], m Aggregator[O, N], name ...string) Chain[I, N]
- func AddChain[N, I, O any](base Chain[I, O], m Chain[O, N], name ...string) Chain[I, N]
- func AddConditional[I, O any](base Chain[I, O], m Condition, n Chain[O, O], name ...string) Chain[I, O]
- func AddExplode[N, I, O any](base Chain[I, O], m Exploder[O, N], name ...string) Chain[I, N]
- func AddExplodeByFactory[N, I, O any](base Chain[I, O], m ExploderFactory[O, N], name ...string) Chain[I, N]
- func AddFilter[I, O any](base Chain[I, O], m Filter[O], name ...string) Chain[I, O]
- func AddMap[N, I, O any](base Chain[I, O], m Mapper[O, N], name ...string) Chain[I, N]
- func AddParallel[N, I, O any](base Chain[I, O], p Chain[O, N], pool processing.Processing, name ...string) Chain[I, N]
- func AddSequential[I, O, N any](base Chain[I, O], p Chain[O, N]) Chain[I, N]
- func AddSort[I, O any](base Chain[I, O], m CompareFunc[O], name ...string) Chain[I, O]
- func AddStable[I, O, N any](base Chain[I, O], p Chain[O, N], pool processing.Processing, name ...string) Chain[I, N]
- func AddStep[N, I, O any](base Chain[I, O], s Step[O, N]) Chain[I, N]
- func AddTransform[N, I, O any](base Chain[I, O], m Transformer[O, N], name ...string) Chain[I, N]
- func Aggregated[I, O any](m Aggregator[I, O], name ...string) Chain[I, O]
- func ConditionalChain[I any](m Condition, n Chain[I, I], name ...string) Chain[I, I]
- func Exploded[I, O any](m Exploder[I, O], name ...string) Chain[I, O]
- func ExplodedByFactory[I, O any](m ExploderFactory[I, O], name ...string) Chain[I, O]
- func Filtered[I any](m Filter[I], name ...string) Chain[I, I]
- func ForStep[I, O any](s Step[I, O]) Chain[I, O]
- func Mapped[I, O any](m Mapper[I, O], name ...string) Chain[I, O]
- func New[I any]() Chain[I, I]
- func Parallel[I, O any](n Chain[I, O], pool processing.Processing, name ...string) Chain[I, O]
- func Sequential[I, O any](p Chain[I, O]) Chain[I, O]
- func Sorted[I any](m CompareFunc[I], name ...string) Chain[I, I]
- func Stable[I, O any](p Chain[I, O], pool processing.Processing, name ...string) Chain[I, O]
- func Transformed[I, O any](m Transformer[I, O], name ...string) Chain[I, O]
- type CompareFunc
- type Condition
- type Exploder
- type ExploderFactory
- type Filter
- type Mapper
- type Step
- func AggregationStep[I, O any](m Aggregator[I, O], name ...string) Step[I, O]
- func ConditionalStep[I any](m Condition, n Chain[I, I], name ...string) Step[I, I]
- func ExplodeStep[I, O any](m Exploder[I, O], name ...string) Step[I, O]
- func ExplodeStepByFactory[I, O any](m ExploderFactory[I, O], name ...string) Step[I, O]
- func FilterStep[I any](m Filter[I], name ...string) Step[I, I]
- func MappingStep[I, O any](m Mapper[I, O], name ...string) Step[I, O]
- func ParallelStep[I any](p Chain[I, I], pool processing.Processing, name ...string) Step[I, I]
- func SequentialStep[I, O any](p Chain[I, O], name ...string) Step[I, O]
- func SortStep[I any](m CompareFunc[I], name ...string) Step[I, I]
- func StableStep[I any](p Chain[I, I], pool processing.Processing, name ...string) Step[I, I]
- func TransformStep[I, O any](m Transformer[I, O], name ...string) Step[I, O]
- type Transformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertAggregator ¶
func ConvertAggregator[NI, NO, I, O any](in Aggregator[I, O]) internal.GAggregator[NI, NO]
func ConvertExploder ¶
ConvertExploder converts an Exploder of type I to O into an Exploder of type NI to NO using type assertions and slice conversion.
func ConvertExploderFactory ¶
func ConvertExploderFactory[NI, NO, I, O any](m ExploderFactory[I, O]) internal.GExploderFactory[NI, NO]
func ConvertFilter ¶
ConvertFilter adapts a Filter of type I to a Filter of type N using type assertions for compatibility in chains.
Types ¶
type Aggregation ¶
type Aggregation[I, O any] interface { internal.GAggregation[I, O] }
Aggregation represents a generic interface for performing incremental aggregation over input elements. The input type is represented by I and the output type by O. 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[I, O any] = func() Aggregation[I, O]
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[I, O any] interface { Execute(ctx context.Context, seq iter.Seq[I], name ...string) iter.Seq[O] ExecuteWithConfig(ctx context.Context, cfg any, seq iter.Seq[I], name ...string) iter.Seq[O] // contains filtered or unexported methods }
func AddAggregation ¶
func AddAggregation[N, I, O any](base Chain[I, O], m Aggregator[O, N], name ...string) Chain[I, N]
func AddConditional ¶
func AddExplode ¶
func AddExplodeByFactory ¶
func AddExplodeByFactory[N, I, O any](base Chain[I, O], m ExploderFactory[O, N], name ...string) Chain[I, N]
func AddParallel ¶
func AddParallel[N, I, O any](base Chain[I, O], p Chain[O, N], pool processing.Processing, name ...string) Chain[I, N]
func AddSort ¶
func AddSort[I, O any](base Chain[I, O], m CompareFunc[O], name ...string) Chain[I, O]
func AddStable ¶
func AddStable[I, O, N any](base Chain[I, O], p Chain[O, N], pool processing.Processing, name ...string) Chain[I, N]
func AddTransform ¶
func AddTransform[N, I, O any](base Chain[I, O], m Transformer[O, N], name ...string) Chain[I, N]
func Aggregated ¶
func Aggregated[I, O any](m Aggregator[I, O], name ...string) Chain[I, O]
func ConditionalChain ¶
func ExplodedByFactory ¶
func ExplodedByFactory[I, O any](m ExploderFactory[I, O], name ...string) Chain[I, O]
func Parallel ¶
func Parallel[I, O any](n Chain[I, O], pool processing.Processing, name ...string) Chain[I, O]
func Sequential ¶
func Stable ¶
func Stable[I, O any](p Chain[I, O], pool processing.Processing, name ...string) Chain[I, O]
func Transformed ¶
func Transformed[I, O any](m Transformer[I, O], name ...string) Chain[I, O]
type CompareFunc ¶
func ConvertCompareFunc ¶
func ConvertCompareFunc[N, I any](f general.CompareFunc[I]) CompareFunc[N]
type ExploderFactory ¶
type ExploderFactory[I, O any] = internal.GExploderFactory[I, O]
func ExploderFactoryFor ¶
func ExploderFactoryFor[I, O any](e Exploder[I, O]) ExploderFactory[I, O]
type Step ¶
type Step[I, O any] interface { // contains filtered or unexported methods }
func AggregationStep ¶
func AggregationStep[I, O any](m Aggregator[I, O], name ...string) Step[I, O]
func ConditionalStep ¶
func ExplodeStepByFactory ¶
func ExplodeStepByFactory[I, O any](m ExploderFactory[I, O], name ...string) Step[I, O]
func ParallelStep ¶
func ParallelStep[I any](p Chain[I, I], pool processing.Processing, name ...string) Step[I, I]
func StableStep ¶
func StableStep[I any](p Chain[I, I], pool processing.Processing, name ...string) Step[I, I]
func TransformStep ¶
func TransformStep[I, O any](m Transformer[I, O], name ...string) Step[I, O]
type Transformer ¶
type Transformer[I, O any] = func(in []I) []O
func ConvertTransformer ¶
func ConvertTransformer[NI, NO, I, O any](f Transformer[I, O]) Transformer[NI, NO]