Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQSConsumer ¶
type SQSConsumer[I []byte, O []*SQSConsumerOutput] struct { // contains filtered or unexported fields }
SQS Consumer is a Task that when called, get messages from a SQS queue and return them. It return an array of SQSConsumerOutput and append messages receipt handlers on metadata Exclude messages based on receipt handler is user responsability
func NewSQSConsumer ¶
func NewSQSConsumer[I []byte, O []*SQSConsumerOutput](client sqsiface.SQSAPI, logger *slog.Logger, opts *SQSConsumerOpts) *SQSConsumer[I, O]
func (*SQSConsumer[I, O]) GetQueueURL ¶
func (c *SQSConsumer[I, O]) GetQueueURL() *string
func (*SQSConsumer[I, O]) Run ¶
func (c *SQSConsumer[I, O]) Run(_ context.Context, _ interface{}, meta map[string]interface{}, name string) (O, error)
Run when called consume messages from SQS and return TaskData with Data containing an array of *SQSConsumerOutput It appends receipt handlers to metadata to be excluded later by user
type SQSConsumerOpts ¶
type SQSConsumerOutput ¶
type SQSDeleter ¶
SQSDeleter will delete a message on SQS based on a given receiptHandle
func NewSQSDeleter ¶
func NewSQSDeleter[I string, O task.Nullable](client sqsiface.SQSAPI, logger *slog.Logger, opts *SQSDeleterOpts) *SQSDeleter[I, O]
func (*SQSDeleter[I, O]) GetQueueURL ¶
func (s *SQSDeleter[I, O]) GetQueueURL() *string
type SQSDeleterOpts ¶
type SQSDeleterOpts struct {
// SQS queue name which Deleter will use to get queue url
QueueName string
}
type SQSProducer ¶
type SQSProducer[I SQSProducerInput, O task.Nullable] struct { // contains filtered or unexported fields }
Simple generic task to produce messages to SQS
func NewSQSProducer ¶
func NewSQSProducer[I SQSProducerInput, O task.Nullable](client sqsiface.SQSAPI, logger *slog.Logger, opts *SQSProducerOpts) *SQSProducer[I, O]
func (*SQSProducer[I, O]) GetQueueURL ¶
func (p *SQSProducer[I, O]) GetQueueURL() *string
type SQSProducerInput ¶
type SQSProducerInput struct {
Body string
MsgAtt map[string]*sqs.MessageAttributeValue
}
type SQSProducerOpts ¶
type SQSProducerOpts struct {
// Delay which message will be delivered (if not given, will use default from queue)
DelaySeconds *int64
// QueueName
QueueName string
}
SQS Producer options
Click to show internal directories.
Click to hide internal directories.