poller

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Body          string
	ReceiptHandle *string
}

Message represents an SQS message with Body and ReceiptHandle.

type Poller

type Poller struct {
	// contains filtered or unexported fields
}

Poller is responsible for polling messages from the SQS queue.

func NewPoller

func NewPoller(sqsClient sqsiface.SQSAPI, queueURL string) *Poller

NewPoller creates a new Poller instance with the given SQS client and queue URL.

func (*Poller) DeleteMessage

func (p *Poller) DeleteMessage(receiptHandle *string) error

DeleteMessage deletes a message from the SQS queue using the message's ReceiptHandle.

func (*Poller) Poll

func (p *Poller) Poll() ([]Message, error)

Poll fetches messages from the SQS queue and returns them as a slice of Message structs.

func (*Poller) SendMessageToDLQ

func (p *Poller) SendMessageToDLQ(messageBody string, dlqURL string) error

Send messages to SQS - Dead Letter Queue

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL