Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSSQSListener ¶
type AWSSQSListener struct {
// contains filtered or unexported fields
}
AWSSQSListener handles AWS SQS notifications.
func NewAWSSQSListener ¶
func NewAWSSQSListener(ctx context.Context, config *modelAWS.AWSSQSConfig, client client.Client, logger logr.Logger) (*AWSSQSListener, error)
NewAWSSQSListener creates a new AWSSQSListener.
func (*AWSSQSListener) PollMessages ¶
func (h *AWSSQSListener) PollMessages() ([]types.Message, error)
pollMessages fetches messages from the SQS queue and returns them as an array.
func (*AWSSQSListener) SetSQSClient ¶
func (h *AWSSQSListener) SetSQSClient(sqsClient SQSClientInterface) error
func (*AWSSQSListener) Start ¶
func (h *AWSSQSListener) Start() (<-chan []types.Message, <-chan error)
Start begins polling the SQS queue for messages and yields them through a channel.
func (*AWSSQSListener) Stop ¶
func (h *AWSSQSListener) Stop() error
Stop stops polling the SQS queue and ensures all channels are properly closed.
type SQSClientInterface ¶
type SQSClientInterface interface {
ReceiveMessage(ctx context.Context, params *sqs.ReceiveMessageInput, optFns ...func(*sqs.Options)) (*sqs.ReceiveMessageOutput, error)
DeleteMessage(ctx context.Context, params *sqs.DeleteMessageInput, optFns ...func(*sqs.Options)) (*sqs.DeleteMessageOutput, error)
}
Click to show internal directories.
Click to hide internal directories.