Versions in this module Expand all Collapse all v2 v2.1.0 Mar 11, 2026 Changes in this version type Dispatcher + func (d *Dispatcher) DispatchWithBackoff(ctx context.Context, queue, typeName string, payload interface{}, ...) error type Job + BackoffSeconds []uint v2.0.0 Mar 8, 2026 Changes in this version + func RegisterHandler(typeName string, handler HandlerFunc) + func ResetHandlers() + type DatabaseDriver struct + func NewDatabaseDriver(db *gorm.DB, table, failedTable string) *DatabaseDriver + func (d *DatabaseDriver) Delete(_ context.Context, job *Job) error + func (d *DatabaseDriver) Fail(_ context.Context, job *Job, jobErr error) error + func (d *DatabaseDriver) Pop(_ context.Context, queue string) (*Job, error) + func (d *DatabaseDriver) Push(_ context.Context, job *Job) error + func (d *DatabaseDriver) Release(_ context.Context, job *Job, delay time.Duration) error + func (d *DatabaseDriver) Size(_ context.Context, queue string) (int64, error) + type Dispatcher struct + func NewDispatcher(driver Driver) *Dispatcher + func (d *Dispatcher) Dispatch(ctx context.Context, queue, typeName string, payload interface{}) error + func (d *Dispatcher) DispatchDelayed(ctx context.Context, queue, typeName string, payload interface{}, ...) error + func (d *Dispatcher) Driver() Driver + type Driver interface + Delete func(ctx context.Context, job *Job) error + Fail func(ctx context.Context, job *Job, jobErr error) error + Pop func(ctx context.Context, queue string) (*Job, error) + Push func(ctx context.Context, job *Job) error + Release func(ctx context.Context, job *Job, delay time.Duration) error + Size func(ctx context.Context, queue string) (int64, error) + type HandlerFunc func(ctx context.Context, payload json.RawMessage) error + func ResolveHandler(typeName string) HandlerFunc + type Job struct + Attempts uint + AvailableAt time.Time + CreatedAt time.Time + ID uint64 + MaxAttempts uint + Payload json.RawMessage + Queue string + ReservedAt *time.Time + Type string + type MemoryDriver struct + func NewMemoryDriver() *MemoryDriver + func (d *MemoryDriver) Delete(_ context.Context, job *Job) error + func (d *MemoryDriver) Fail(_ context.Context, job *Job, _ error) error + func (d *MemoryDriver) Pop(_ context.Context, queue string) (*Job, error) + func (d *MemoryDriver) Push(_ context.Context, job *Job) error + func (d *MemoryDriver) Release(_ context.Context, job *Job, delay time.Duration) error + func (d *MemoryDriver) Size(_ context.Context, queue string) (int64, error) + type RedisDriver struct + func NewRedisDriver(client *redis.Client) *RedisDriver + func (d *RedisDriver) Delete(_ context.Context, _ *Job) error + func (d *RedisDriver) Fail(ctx context.Context, job *Job, _ error) error + func (d *RedisDriver) Pop(ctx context.Context, queue string) (*Job, error) + func (d *RedisDriver) Push(ctx context.Context, job *Job) error + func (d *RedisDriver) Release(ctx context.Context, job *Job, delay time.Duration) error + func (d *RedisDriver) Size(ctx context.Context, queue string) (int64, error) + type SyncDriver struct + func NewSyncDriver() *SyncDriver + func (d *SyncDriver) Delete(_ context.Context, _ *Job) error + func (d *SyncDriver) Fail(_ context.Context, _ *Job, _ error) error + func (d *SyncDriver) Pop(_ context.Context, _ string) (*Job, error) + func (d *SyncDriver) Push(ctx context.Context, job *Job) error + func (d *SyncDriver) Release(_ context.Context, _ *Job, _ time.Duration) error + func (d *SyncDriver) Size(_ context.Context, _ string) (int64, error) + type Worker struct + func NewWorker(driver Driver, config WorkerConfig, log *slog.Logger) *Worker + func (w *Worker) Run(ctx context.Context) error + type WorkerConfig struct + Concurrency int + MaxAttempts uint + PollInterval time.Duration + Queues []string + RetryDelay time.Duration + Timeout time.Duration