Documentation
¶
Overview ¶
Package engine implements the outbox background machinery: the store (enqueue/claim/mark/cleanup queries) and the relay and cleaner workers.
Index ¶
Constants ¶
const NotifyChannel = "outbox_messages"
NotifyChannel is the fixed LISTEN/NOTIFY channel (matches the migration trigger). It cannot be parameterized; cross-schema wake-ups are harmless because SKIP LOCKED deduplicates claims.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cleaner ¶
type Cleaner struct {
// contains filtered or unexported fields
}
Cleaner periodically deletes published rows older than the retention window.
func NewCleaner ¶
NewCleaner builds a Cleaner.
type Relay ¶
type Relay struct {
// contains filtered or unexported fields
}
Relay claims ready rows, publishes them, and records the outcome.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store runs the outbox SQL. The relay/cleaner queries use exec (must not be tx-bound); enqueue uses enq (joins the caller's business tx). pool is optional and only LISTEN/NOTIFY needs it.