Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // MaxNumberOfMessage at one poll MaxNumberOfMessage int64 = 10 // WaitTimeSecond for each poll WaitTimeSecond int64 = 20 )
Exported variables
Functions ¶
This section is empty.
Types ¶
type HandlerFunc ¶
HandlerFunc is used to define the Handler that is run on for each message
func (HandlerFunc) HandleMessage ¶
func (f HandlerFunc) HandleMessage(msg *sqs.Message) error
HandleMessage is used for the actual execution of each message
type InvalidMessageError ¶
InvalidMessageError for message that can't be processed and should be deleted
func NewInvalidMessageError ¶
func NewInvalidMessageError(SQSMessage, logMessage string) InvalidMessageError
NewInvalidMessageError to create new error for messages that should be deleted
func (InvalidMessageError) Error ¶
func (e InvalidMessageError) Error() string
type Service ¶
type Service struct { AWSSession *session.Session BackupFirehose *firehose.Firehose BackupFirehoseName string JobSQS *sqs.SQS JobSQSURL string }
Service works through the job SQS queue
func NewServiceWithConfig ¶
NewServiceWithConfig creates a new worker service with the specified AWS config
Click to show internal directories.
Click to hide internal directories.