Documentation
¶
Index ¶
- Variables
- func NewMemoryQueueRepository[T any]() domain.QueueRepository[T]
- type Job
- type JobOption
- func WithBackoff(d time.Duration) JobOption
- func WithDelay(d time.Duration) JobOption
- func WithExponentialBackoff(initial, max time.Duration, factor float64, jitter bool) JobOption
- func WithIdempotencyKey(key string) JobOption
- func WithJobID(id string) JobOption
- func WithMaxAttempts(attempts int) JobOption
- type Processor
- type Queue
- type Worker
- type WorkerHooks
- type WorkerOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDuplicateJob = domain.ErrDuplicateJob
Functions ¶
func NewMemoryQueueRepository ¶
func NewMemoryQueueRepository[T any]() domain.QueueRepository[T]
Types ¶
type JobOption ¶
func WithBackoff ¶
func WithExponentialBackoff ¶
func WithIdempotencyKey ¶
func WithMaxAttempts ¶
type Queue ¶
func NewQueueWithRepo ¶
func NewQueueWithRepo[T any](name string, repo domain.QueueRepository[T]) *Queue[T]
type Worker ¶
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]
Click to show internal directories.
Click to hide internal directories.