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 ¶
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 ¶
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 ¶
type Queue interface { ReceiveMessage(*awsSQS.ReceiveMessageInput) (*awsSQS.ReceiveMessageOutput, error) DeleteMessage(*awsSQS.DeleteMessageInput) (*awsSQS.DeleteMessageOutput, error) SendMessage(*awsSQS.SendMessageInput) (*awsSQS.SendMessageOutput, error) }
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.