File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -154,14 +154,14 @@ func WithRetryInterval(d time.Duration) Option {
154154// Options holds the configuration parameters for a Queue.
155155// Use the With* functions to configure these options when creating a queue.
156156type Options struct {
157- workerCount int64 // Number of concurrent worker goroutines (default: runtime.NumCPU())
158- logger Logger // Logger for queue events (default: stderr logger)
159- queueSize int // Maximum queue capacity, 0 means unlimited (default: 0)
160- worker core.Worker // Worker implementation for queue backend (default: Ring buffer)
161- fn func (context.Context , core.TaskMessage ) error // Task handler function (default: no-op)
162- afterFn func () // Callback executed after each job (default: nil)
163- metric Metric // Metrics collector (default: built-in metric)
164- retryInterval time.Duration // Polling interval when queue is empty (default: 1 second)
157+ workerCount int64 // Number of concurrent worker goroutines
158+ logger Logger // Logger for queue events
159+ queueSize int // Maximum queue capacity, 0 means unlimited
160+ worker core.Worker // Worker implementation for queue backend
161+ fn func (context.Context , core.TaskMessage ) error // Task handler function
162+ afterFn func () // Callback executed after each job
163+ metric Metric // Metrics collector
164+ retryInterval time.Duration // Polling interval when queue is empty
165165}
166166
167167// NewOptions creates an Options struct with default values and applies any provided options.
You can’t perform that action at this time.
0 commit comments