Versions in this module Expand all Collapse all v0 v0.2.0 Jun 3, 2026 Changes in this version + type WorkerCallbacks struct + OnComplete func(sourceRef, destRef string, duration time.Duration) + OnFailed func(sourceRef, destRef string, errMsg string) + OnHeartbeat func(sourceRef string, elapsed time.Duration) type WorkerConfig + Callbacks WorkerCallbacks v0.1.0 Jun 1, 2026 Changes in this version + func Backoff(attempt int, base, max time.Duration) time.Duration + type Pool struct + func NewPool(concurrency int, staleTimeout time.Duration, cfg WorkerConfig, q *db.Queue, ...) *Pool + func (p *Pool) Run(ctx context.Context) error + type WorkerConfig struct + BaseBackoff time.Duration + ExitWhenDone bool + MaxAttempts int + MaxBackoff time.Duration + OnComplete func(sourceRef, destRef string, duration time.Duration) + OnFailed func(sourceRef, destRef string, errMsg string) + OnHeartbeat func(sourceRef string, elapsed time.Duration) + PollInterval time.Duration + WorkerID string