sqs

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMessageSink

func NewMessageSink(config MessageSinkConfig) (pubsub.MessageSink, error)

NewMessageSink is the sink constructor. If SQS client is nil, an error is returned.

func NewMessageSource

func NewMessageSource(config MessageSourceConfig) (pubsub.MessageSource, error)

NewMessageSource is the source constructor. If a nil client is passed an error is returned.

Types

type ConsumerError

type ConsumerError struct {
	MsgID string
	Value error
}

ConsumerError satisfies error interface and is returned when a message fails to be handled. If you do a type switch on the error, you can extract the MsgID.

func (*ConsumerError) Error

func (e *ConsumerError) Error() string

Error method satisfies Error interface of standard library for ConsumerError struct.

type MessageSinkConfig

type MessageSinkConfig struct {
	Client   Queue
	QueueURL *string
}

MessageSinkConfig allows you to set sink options.

type MessageSourceConfig

type MessageSourceConfig struct {
	// WaitSeconds is the wait time in seconds to wait between API polling requests.
	// If used, will make fewer requests per day which results in smaller AWS bill.
	// Defaults to 0 which effectively disables this.
	WaitSeconds time.Duration
	Client      Queue
	QueueURL    string
}

MessageSourceConfig allows you to configure various source options.

type Queue

Queue interface has the same signature as the methods in SQS struct in aws-sdk-go. Holds only the messages we're interested in pubsub.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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