sns

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyConfig    = errors.New("empty config")
	ErrEmptyAccessKey = errors.New("empty access key")
	ErrEmptySecretKey = errors.New("empty secret key")
)

Functions

func MustNewConsumer

func MustNewConsumer(config *ConsumerConfig) messaging.Consumer

func MustNewProducer

func MustNewProducer(config ProducerConfig) messaging.Producer

func NewConsumer

func NewConsumer(config *ConsumerConfig) (messaging.Consumer, error)

func NewProducer

func NewProducer(config ProducerConfig) (messaging.Producer, error)

func PriorityConsume added in v0.0.12

func PriorityConsume(consumers []messaging.Consumer)

PriorityConsume function takes a list of consumer objects and starts consuming them in a loop. The consumers are processed according to their priority. The process is stopped if the stop signal is received. The function exits when all consumers are stopped.

Types

type ConsumerConfig

type ConsumerConfig struct {
	AccessKey           string
	SecretKey           string
	Region              string
	VisibilityTimeout   int64
	WaitTimeSeconds     int64
	MaxNumberOfMessages int64
	QueueUrl            string
}

type ProducerConfig

type ProducerConfig struct {
	AccessKey       string
	SecretKey       string
	Region          string
	PublishInterval time.Duration
}

Jump to

Keyboard shortcuts

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