outbox

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(ctx context.Context, url string, callback Batcher) error

Types

type Batcher

type Batcher interface {
	SendBatch(ctx context.Context, destination string, messages []*Message) error
}

type Message

type Message struct {
	ID      string
	Message []byte
	Headers map[string][]string
}

type SNSAPI

type SNSAPI interface {
	PublishBatch(ctx context.Context, params *sns.PublishBatchInput, optFns ...func(*sns.Options)) (*sns.PublishBatchOutput, error)
	Publish(ctx context.Context, params *sns.PublishInput, optFns ...func(*sns.Options)) (*sns.PublishOutput, error)
}

type SNSBatcher

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

func NewSNSBatcher

func NewSNSBatcher(client SNSAPI, prefix string) *SNSBatcher

func (*SNSBatcher) DeadLetter added in v0.0.2

func (b *SNSBatcher) DeadLetter(ctx context.Context, message *dante_tpb.DeadMessage) error

func (*SNSBatcher) SendBatch

func (b *SNSBatcher) SendBatch(ctx context.Context, destination string, msgs []*Message) error

Jump to

Keyboard shortcuts

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