outbox_queue

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package outbox_queue implements the queue.Queue contract on top of the outbox: each task is stored as an outbox message whose subject carries the channel, so the relay ships it to the work-queue stream.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OutboxQueue

type OutboxQueue struct {
	// contains filtered or unexported fields
}

OutboxQueue implements queue.Queue by reusing the outbox publisher.

func NewOutboxQueue

func NewOutboxQueue(publisher outbox.Outbox) *OutboxQueue

func (*OutboxQueue) Enqueue

func (q *OutboxQueue) Enqueue(ctx context.Context, t queue.Task) error

Enqueue stages a task on the default channel. MUST be called inside a UnitOfWork transaction so the outbox row write is atomic with the triggering state change.

func (*OutboxQueue) EnqueueOn

func (q *OutboxQueue) EnqueueOn(ctx context.Context, channel string, t queue.Task) error

EnqueueOn stages a task on a named channel.

Jump to

Keyboard shortcuts

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