Documentation
¶
Index ¶
- func Await[T any](ch AsyncOp[T]) (T, error)
- func FlatMap[T any, R any](ctx *Context, data []T, processor func(t T, index int) ([]R, error)) ([]R, error)
- func Foreach[T any](ctx *Context, data []T, processor func(t T, index int) error) error
- func Map[T any, R any](ctx *Context, data []T, processor func(t T, index int) (R, error)) ([]R, error)
- type AsyncOp
- type Context
- type PendingItem
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶ added in v0.0.2
type Context struct { context.Context Parallelization int // contains filtered or unexported fields }
func DefaultContext ¶ added in v0.0.2
func DefaultContext() *Context
func NewContext ¶ added in v0.0.2
func (*Context) WithAutoClose ¶ added in v0.0.2
WithAutoClose sets whether the context should automatically close global workQueue when finishing the root work.
func (*Context) WithContext ¶ added in v0.0.2
func (*Context) WithMaxWorkers ¶ added in v0.0.2
WithMaxWorkers sets the maximum number of workers that can be spawned.
type PendingItem ¶ added in v0.0.2
type PendingItem[T any] struct { // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.