Documentation
¶
Index ¶
- type Errs
- type Limiter
- type Task
- func Error(err error) Task
- func NoError(task Task) Task
- func Parallel(tasks ...Task) Task
- func ParallelFailSafe(tasks ...Task) Task
- func ParallelFailSafeWithLimit(limit int, tasks ...Task) Task
- func ParallelWithLimit(limit int, tasks ...Task) Task
- func Periodic(task Task, dur time.Duration, init bool) Task
- func Serial(tasks ...Task) Task
- func SerialFailSafe(tasks ...Task) Task
- type TaskFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Errs ¶
type Errs []error
Errs slice of error, may contain nils, user can known which task failed, which not failed
type Task ¶
func Parallel ¶
Parallel, create a Task run all tasks in parallel, one failed, others will be cancelled via context returns Errs indicating which task failed, which not failed
func ParallelFailSafe ¶
ParallelFailSafe, create a Task run all tasks in parallel, one failed, others will still Run returns Errs indicating which task failed, which not failed
func ParallelFailSafeWithLimit ¶
ParallelFailSafeWithLimit, create a Task run all tasks in parallel with limit using token based concurrency control returns Errs indicating which task failed, which not failed
func ParallelWithLimit ¶
ParallelWithLimit, create a Task run all tasks in parallel with limit, one failed, others will be cancelled via context returns Errs indicating which task failed, which not failed
func SerialFailSafe ¶
SerialFailSafe run tasks in serial, one failed will not interfere others