Documentation
¶
Index ¶
- type ParallelExecutor
- func (pe *ParallelExecutor) AddTask(task ...Task) *ParallelExecutor
- func (pe *ParallelExecutor) Execute(ctx context.Context) error
- func (pe *ParallelExecutor) SetParallelism(p int) *ParallelExecutor
- func (pe *ParallelExecutor) SetRetries(n int) *ParallelExecutor
- func (pe *ParallelExecutor) SetTimeout(d time.Duration) *ParallelExecutor
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ParallelExecutor ¶
type ParallelExecutor struct {
// contains filtered or unexported fields
}
ParallelExecutor 并行执行器
func (*ParallelExecutor) AddTask ¶
func (pe *ParallelExecutor) AddTask(task ...Task) *ParallelExecutor
AddTask 添加任务
func (*ParallelExecutor) Execute ¶
func (pe *ParallelExecutor) Execute(ctx context.Context) error
Execute 执行任务
func (*ParallelExecutor) SetParallelism ¶
func (pe *ParallelExecutor) SetParallelism(p int) *ParallelExecutor
SetParallelism 设置并行度
func (*ParallelExecutor) SetRetries ¶
func (pe *ParallelExecutor) SetRetries(n int) *ParallelExecutor
SetRetries 设置任务重试次数
func (*ParallelExecutor) SetTimeout ¶
func (pe *ParallelExecutor) SetTimeout(d time.Duration) *ParallelExecutor
SetTimeout 设置任务超时时间
Click to show internal directories.
Click to hide internal directories.