tm

package
v0.0.0-...-76fafce Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InboxHandler

func InboxHandler(store InboxStore) am.MessageHandlerMiddleware

func OutboxPublisher

func OutboxPublisher(store OutboxStore) am.MessagePublisherMiddleware

Types

type ErrDuplicateMessage

type ErrDuplicateMessage string

func (ErrDuplicateMessage) Error

func (e ErrDuplicateMessage) Error() string

type InboxStore

type InboxStore interface {
	Save(ctx context.Context, msg am.IncomingMessage) error
}

type OutboxProcessor

type OutboxProcessor interface {
	Start(ctx context.Context) error
}

func NewOutboxProcessor

func NewOutboxProcessor(publisher am.MessagePublisher, store OutboxStore) OutboxProcessor

type OutboxStore

type OutboxStore interface {
	Save(ctx context.Context, msg am.Message) error
	FindUnpublished(ctx context.Context, limit int) ([]am.Message, error)
	MarkPublished(ctx context.Context, ids ...string) error
}

Jump to

Keyboard shortcuts

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