Versions in this module Expand all Collapse all v0 v0.1.0 Jan 17, 2026 Changes in this version + var ErrHandlerMissing = errors.New("task handler is required") + var ErrRunnerClosed = errors.New("task runner is closed") + func DefaultRetryDecider(err error) bool + type BackoffFunc func(attempt int) time.Duration + func ExponentialBackoff(base, max time.Duration) BackoffFunc + type DeadLetter struct + Attempts int + Err error + Name string + type Handler func(context.Context) error + type Job struct + Context context.Context + Handler Handler + Name string + OnDeadLetter func(DeadLetter) + OnRetry func(RetryInfo) + Retry *RetryPolicy + Timeout time.Duration + type Options struct + OnDeadLetter func(DeadLetter) + OnRetry func(RetryInfo) + QueueSize int + Retry *RetryPolicy + Sleep func(time.Duration) + Timeout time.Duration + Workers int + func DefaultOptions() Options + type RetryDecider func(err error) bool + type RetryInfo struct + Attempt int + Err error + Name string + NextDelay time.Duration + type RetryPolicy struct + Backoff BackoffFunc + MaxRetries int + RetryIf RetryDecider + func DefaultRetryPolicy() RetryPolicy + type Runner struct + func New(options Options) *Runner + func (r *Runner) Enqueue(job Job) error + func (r *Runner) EnqueueContext(ctx context.Context, job Job) error + func (r *Runner) Shutdown(ctx context.Context) error + func (r *Runner) Start(ctx context.Context)