Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { QueueArn string `mapstructure:"queue_arn"` QueueName string `mapstructure:"queue_name"` Endpoint string `mapstructure:"endpoint"` WaitTime int64 `mapstructure:"wait_time"` Timeout int64 `mapstructure:"timeout"` Enabled bool `mapstructure:"enabled"` }
Config holds the required sqs config information.
type MessageProcessor ¶
MessageProcessor process a message.
type SQSConsumer ¶
type SQSConsumer struct {
// contains filtered or unexported fields
}
SQSConsumer reads and consumes sqs messages.
func NewConsumer ¶
func NewConsumer(c Config, log log.Logger, processor MessageProcessor) (*SQSConsumer, error)
NewConsumer creates and initializes an SQSConsumer
func (*SQSConsumer) ProcessMessages ¶
func (s *SQSConsumer) ProcessMessages(ctx context.Context)
ProcessMessages reads messages from a SQS queue and sends them to the MessageProcessor.
Click to show internal directories.
Click to hide internal directories.