queuewrap

package
v0.0.0-...-a9542f3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDuplicateJob = domain.ErrDuplicateJob

Functions

func NewMemoryQueueRepository

func NewMemoryQueueRepository[T any]() domain.QueueRepository[T]

Types

type Job

type Job[T any] = domain.Job[T]

type JobOption

type JobOption = usecase.JobOption

func WithBackoff

func WithBackoff(d time.Duration) JobOption

func WithDelay

func WithDelay(d time.Duration) JobOption

func WithExponentialBackoff

func WithExponentialBackoff(initial, max time.Duration, factor float64, jitter bool) JobOption

func WithIdempotencyKey

func WithIdempotencyKey(key string) JobOption

func WithJobID

func WithJobID(id string) JobOption

func WithMaxAttempts

func WithMaxAttempts(attempts int) JobOption

type Processor

type Processor[T any] = usecase.Processor[T]

type Queue

type Queue[T any] = usecase.Queue[T]

func NewQueue

func NewQueue[T any](name string, redisOpts *redisclient.Options) *Queue[T]

func NewQueueWithRepo

func NewQueueWithRepo[T any](name string, repo domain.QueueRepository[T]) *Queue[T]

type Worker

type Worker[T any] = usecase.Worker[T]

func NewWorker

func NewWorker[T any](queueName string, redisOpts *redisclient.Options, processor Processor[T], opts ...WorkerOption[T]) *Worker[T]

func NewWorkerWithRepo

func NewWorkerWithRepo[T any](queueName string, repo domain.QueueRepository[T], processor Processor[T], opts ...WorkerOption[T]) *Worker[T]

type WorkerHooks

type WorkerHooks[T any] = usecase.WorkerHooks[T]

type WorkerOption

type WorkerOption[T any] = usecase.WorkerOption[T]

func WithConcurrency

func WithConcurrency[T any](concurrency int) WorkerOption[T]

func WithHooks

func WithHooks[T any](hooks WorkerHooks[T]) WorkerOption[T]

func WithVisibilityTimeout

func WithVisibilityTimeout[T any](timeout time.Duration) WorkerOption[T]

Jump to

Keyboard shortcuts

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