Versions in this module Expand all Collapse all v1 v1.0.0 Jun 11, 2021 Changes in this version + var ErrCancelWithNil = errors.New("mapreduce cancelled with nil") + var ErrReduceNoOutput = errors.New("reduce not writing value") + func Finish(fns ...func() error) error + func FinishVoid(fns ...func()) + func Map(generate GenerateFunc, mapper MapFunc, opts ...Option) chan interface + func MapReduce(generate GenerateFunc, mapper MapperFunc, reducer ReducerFunc, opts ...Option) (interface{}, error) + func MapReduceVoid(generate GenerateFunc, mapper MapperFunc, reducer VoidReducerFunc, ...) error + func MapReduceWithSource(source <-chan interface{}, mapper MapperFunc, reducer ReducerFunc, ...) (interface{}, error) + func MapVoid(generate GenerateFunc, mapper VoidMapFunc, opts ...Option) + type GenerateFunc func(source chan<- interface{}) + type MapFunc func(item interface{}, writer Writer) + type MapperFunc func(item interface{}, writer Writer, cancel func(error)) + type Option func(opts *mapReduceOptions) + func WithWorkers(workers int) Option + type ReducerFunc func(pipe <-chan interface{}, writer Writer, cancel func(error)) + type VoidMapFunc func(item interface{}) + type VoidReducerFunc func(pipe <-chan interface{}, cancel func(error)) + type Writer interface + Write func(v interface{})