Documentation
¶
Index ¶
- func UnwrapErr(err error) []error
- type InfallibleResultPool
- type Pool
- func (p *Pool) Go(jobLabel string, fn func(context.Context) error)
- func (p *Pool) Wait(ctx context.Context) error
- func (p *Pool) WithCancelOnError() *Pool
- func (p *Pool) WithFirstError() *Pool
- func (p *Pool) WithJobCount(count int) *Pool
- func (p *Pool) WithLogLevel(level zerolog.Level) *Pool
- func (p *Pool) WithMaxGoroutines(routines int) *Pool
- type ResultPool
- func (p *ResultPool[T]) Go(jobLabel string, fn func(context.Context) (T, error))
- func (p *ResultPool[T]) Wait(ctx context.Context) ([]T, error)
- func (p *ResultPool[T]) WithCancelOnError() *ResultPool[T]
- func (p *ResultPool[T]) WithFirstError() *ResultPool[T]
- func (p *ResultPool[T]) WithJobCount(count int) *ResultPool[T]
- func (p *ResultPool[T]) WithLogLevel(level zerolog.Level) *ResultPool[T]
- func (p *ResultPool[T]) WithMaxGoroutines(routines int) *ResultPool[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InfallibleResultPool ¶
type InfallibleResultPool[T any] struct { // contains filtered or unexported fields }
func NewInfallibleWithResults ¶
func NewInfallibleWithResults[T any](ctx context.Context, poolLabel string) *InfallibleResultPool[T]
func (*InfallibleResultPool[T]) Go ¶
func (i *InfallibleResultPool[T]) Go(jobLabel string, fn func(context.Context) T)
func (*InfallibleResultPool[T]) Wait ¶
func (i *InfallibleResultPool[T]) Wait(ctx context.Context) []T
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) WithCancelOnError ¶
func (*Pool) WithFirstError ¶
func (*Pool) WithJobCount ¶
func (*Pool) WithMaxGoroutines ¶
type ResultPool ¶
type ResultPool[T any] struct { // contains filtered or unexported fields }
func NewWithResults ¶
func NewWithResults[T any](ctx context.Context, poolLabel string) *ResultPool[T]
func (*ResultPool[T]) Go ¶
func (p *ResultPool[T]) Go(jobLabel string, fn func(context.Context) (T, error))
func (*ResultPool[T]) WithCancelOnError ¶
func (p *ResultPool[T]) WithCancelOnError() *ResultPool[T]
func (*ResultPool[T]) WithFirstError ¶
func (p *ResultPool[T]) WithFirstError() *ResultPool[T]
func (*ResultPool[T]) WithJobCount ¶
func (p *ResultPool[T]) WithJobCount(count int) *ResultPool[T]
func (*ResultPool[T]) WithLogLevel ¶
func (p *ResultPool[T]) WithLogLevel(level zerolog.Level) *ResultPool[T]
func (*ResultPool[T]) WithMaxGoroutines ¶
func (p *ResultPool[T]) WithMaxGoroutines(routines int) *ResultPool[T]
Click to show internal directories.
Click to hide internal directories.