listener

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

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)
}

Jump to

Keyboard shortcuts

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