Documentation
¶
Overview ¶
Package queuecore contains shared helper logic used by optional driver modules.
This is an advanced support package and not a primary user API. Most application code should use package queue and driver module constructors.
Index ¶
- Variables
- func DriverOptions(job queue.Job) queue.DriverJobOptions
- func DriverWithAttempt(job queue.Job, attempt int) queue.Job
- func NormalizeQueueName(name string) string
- func SafeObserve(ctx context.Context, observer queue.Observer, event queue.Event)
- func UniqueKey(job queue.Job, queueName string) string
- func ValidateDriverJob(job queue.Job) error
Constants ¶
This section is empty.
Variables ¶
var ( // ErrDuplicate is returned when a driver rejects a unique job dispatch because // an unexpired unique lock already exists. ErrDuplicate = queue.ErrDuplicate // ErrBackoffUnsupported is returned when a driver/runtime does not support // custom backoff behavior. ErrBackoffUnsupported = queue.ErrBackoffUnsupported )
Functions ¶
func DriverOptions ¶
func DriverOptions(job queue.Job) queue.DriverJobOptions
DriverOptions returns normalized driver-facing job options for a queue.Job.
func DriverWithAttempt ¶
DriverWithAttempt annotates a queue.Job with an attempt count for worker handler execution paths.
func NormalizeQueueName ¶
NormalizeQueueName returns "default" when the provided queue name is empty.
func SafeObserve ¶
SafeObserve emits an event to an observer and recovers panics from the observer callback.
func UniqueKey ¶ added in v0.3.0
UniqueKey returns the queue-scoped logical identity used for driver deduplication.
func ValidateDriverJob ¶
ValidateDriverJob validates a low-level queue.Job before driver dispatch.
Types ¶
This section is empty.