sns

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientAPI

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

type Publisher

type Publisher struct {
	*PublisherConfig
	// contains filtered or unexported fields
}

func NewPublisher

func NewPublisher(api ClientAPI, topic string, opts ...func(cfg *PublisherConfig)) *Publisher

func (*Publisher) Publish

func (p *Publisher) Publish(ctx context.Context, events []event.Envelope) (err error)

Publish implements event.Publisher

type PublisherConfig

type PublisherConfig struct {
	Serializer event.Serializer
	// BatchEnabled if "true" the publisher groups record events in a single SNS message.
	BatchRecordEnabled bool
}

Jump to

Keyboard shortcuts

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