Documentation
¶
Overview ¶
Package queue defines the task queue contract. the Queue port, and the channel→subject mapping. The outbox-backed implementation lives in adapters/outbox_queue.
Index ¶
Constants ¶
View Source
const DefaultChannel = "default"
DefaultChannel is the channel used by Enqueue. Callers that do not care about channels and prioritization never name a channel; the transport layer routes them here.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Queue ¶
type Queue interface {
Enqueue(ctx context.Context, t Task) error
EnqueueOn(ctx context.Context, channel string, t Task) error
}
Queue enqueues tasks for asynchronous, single-consumer execution. Enqueue uses the default channel; EnqueueOn routes onto a named channel (e.g. a priority lane).
Click to show internal directories.
Click to hide internal directories.