sqs

package
v1.8.16 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 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 SQSConfig

type SQSConfig struct {
	Region     string
	SQSBaseUrl string
}

type SQSMessageQueue

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

SQSMessageQueue is a concrete implementation of IMessageQueue using AWS SQS.

func New

func New(cfg SQSConfig) (*SQSMessageQueue, error)

New initializes a new SQSQueue instance.

func (*SQSMessageQueue) Count

func (q *SQSMessageQueue) Count(ctx context.Context, queueName string) (int, error)

Count returns the number of messages in the specified queue.

func (*SQSMessageQueue) Delete

func (q *SQSMessageQueue) Delete(ctx context.Context, queueName string, id string) error

Delete deletes a message from the specified queue.

func (*SQSMessageQueue) Dequeue

func (q *SQSMessageQueue) Dequeue(ctx context.Context, queueName string, options ...types.DequeueOptions) ([]types.DequeuedMessage, error)

Dequeue receives a message from the specified queue and deletes it after processing.

func (*SQSMessageQueue) Enqueue

func (q *SQSMessageQueue) Enqueue(ctx context.Context, queueName string, payload string, options ...types.EnqueueOptions) error

Enqueue sends a message to the specified queue.

Jump to

Keyboard shortcuts

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