outbox

package
v0.0.0-...-0b5492d Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event interface {
	Kind() string
}

type Message

type Message struct {
	Kind    string
	Payload []byte
}

type OutboxManager

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

func New

func New(
	trans *transaction.Transaction[*sqlx.Tx],
	batchSize uint,
	publisher Publisher,
) OutboxManager

func (OutboxManager) Create

func (r OutboxManager) Create(ctx context.Context, e Event) error

func (OutboxManager) Start

func (c OutboxManager) Start(ctx context.Context, lock *latch.CountDownLatch, heartbeat time.Duration)

type Publisher

type Publisher interface {
	Publish(ctx context.Context, event Message) error
}

Jump to

Keyboard shortcuts

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