Documentation
¶
Index ¶
- Variables
- type Stats
- type TaskGroup
- func (tg *TaskGroup) ActiveWorkers() int
- func (tg *TaskGroup) AvailableWorkers() int
- func (tg *TaskGroup) IsStopped() bool
- func (tg *TaskGroup) MaxWorkers() int
- func (tg *TaskGroup) Stats() Stats
- func (tg *TaskGroup) Stop()
- func (tg *TaskGroup) Submit(ctx context.Context, def task.Definition) (*task.Task, error)
- func (tg *TaskGroup) SubmitBatch(ctx context.Context, defs []task.Definition) ([]*task.Task, error)
- func (tg *TaskGroup) SubmitWithErrGroup(ctx context.Context, defs []task.Definition) error
- func (tg *TaskGroup) Tasks() []*task.Task
- func (tg *TaskGroup) Wait()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTaskGroupStopped = errors.New("task group is stopped") ErrTaskGroupMaxWorkers = errors.New("max workers must be greater than 0") )
Functions ¶
This section is empty.
Types ¶
type TaskGroup ¶
type TaskGroup struct {
// contains filtered or unexported fields
}
func (*TaskGroup) ActiveWorkers ¶
ActiveWorkers returns the current number of active workers.
func (*TaskGroup) AvailableWorkers ¶
AvailableWorkers returns the number of available worker slots.
func (*TaskGroup) MaxWorkers ¶
MaxWorkers returns the maximum number of concurrent workers.
func (*TaskGroup) SubmitBatch ¶
func (*TaskGroup) SubmitWithErrGroup ¶
Click to show internal directories.
Click to hide internal directories.