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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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