queuecore

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 1 Imported by: 5

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

Constants

This section is empty.

Variables

View Source
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

func DriverWithAttempt(job queue.Job, attempt int) queue.Job

DriverWithAttempt annotates a queue.Job with an attempt count for worker handler execution paths.

func NormalizeQueueName

func NormalizeQueueName(name string) string

NormalizeQueueName returns "default" when the provided queue name is empty.

func SafeObserve

func SafeObserve(observer queue.Observer, event queue.Event)

SafeObserve emits an event to an observer and recovers panics from the observer callback.

func ValidateDriverJob

func ValidateDriverJob(job queue.Job) error

ValidateDriverJob validates a low-level queue.Job before driver dispatch.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL