outbox

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PendingEvent

type PendingEvent struct {
	EventID string
	Event   event.DomainEvent
}

type StatusBucket

type StatusBucket struct {
	Status           string     `json:"status"`
	Count            int64      `json:"count"`
	OldestCreatedAt  *time.Time `json:"oldest_created_at,omitempty"`
	OldestAgeSeconds float64    `json:"oldest_age_seconds"`
}

type StatusReader

type StatusReader interface {
	OutboxStatusSnapshot(ctx context.Context, now time.Time) (StatusSnapshot, error)
}

type StatusSnapshot

type StatusSnapshot struct {
	Store       string         `json:"store"`
	GeneratedAt time.Time      `json:"generated_at"`
	Buckets     []StatusBucket `json:"buckets"`
}

type Store

type Store interface {
	ClaimDueEvents(ctx context.Context, limit int, now time.Time) ([]PendingEvent, error)
	MarkEventPublished(ctx context.Context, eventID string, publishedAt time.Time) error
	MarkEventFailed(ctx context.Context, eventID, lastError string, nextAttemptAt time.Time) error
}

Jump to

Keyboard shortcuts

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