Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WorkPool ¶
type WorkPool struct {
// contains filtered or unexported fields
}
WorkPool is a pool of work to be done.
func NewWorkPool ¶
func NewWorkPool(ctx context.Context, workers int, opts ...WorkPoolOption) *WorkPool
NewWorkPool creates a new work pool. The workers argument specifies the number of concurrent workers to run the work. The queue will chunk the work into batches of workers size.
type WorkPoolOption ¶
type WorkPoolOption func(*WorkPool)
WorkPoolOption is a function that configures a WorkPool.
func WithWorkPoolLogger ¶
func WithWorkPoolLogger(logger func(string, ...interface{})) WorkPoolOption
WithWorkPoolLogger sets the logger to use.
Click to show internal directories.
Click to hide internal directories.