Documentation ¶
Overview ¶
Package listener provides an SQS listener which calls a function on each message. After the handler is complete, listener deletes the message.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DedupSQSFilter ¶
type DedupSQSFilter struct {
// contains filtered or unexported fields
}
DedupSQSFilter filters messages if they are a recent duplicate
func NewDedupSQSFilter ¶
func NewDedupSQSFilter(maxEntries int, lifetime time.Duration) *DedupSQSFilter
func (*DedupSQSFilter) Failed ¶
func (f *DedupSQSFilter) Failed(msg *sqs.Message)
Failed will cleanup state of DedupSQSFilter when a message fails processing in this case it should be purged from the cache
type SQSHandler ¶
type SQSListener ¶
type SQSListener struct { Handler SQSHandler // contains filtered or unexported fields }
func BuildSQSListener ¶
func BuildSQSListener(handler SQSHandler, pollInterval time.Duration, client sqsiface.SQSAPI, filter SQSFilter) *SQSListener
func (*SQSListener) Close ¶
func (l *SQSListener) Close()
func (*SQSListener) Listen ¶
func (l *SQSListener) Listen(qName string)
Click to show internal directories.
Click to hide internal directories.