sqs

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQSQueue

type SQSQueue struct {
	URL    string
	Client sqsiface.SQSAPI
}

SQSQueue is a Queue with Amazon SQS.

func NewSQSQueue

func NewSQSQueue(queueName string, region string) (*SQSQueue, error)

NewSQSQueue creates a Queue with Amazon SQS.

func (*SQSQueue) FetchMessages

func (q *SQSQueue) FetchMessages() ([]string, error)

FetchMessages dequeue messages from SQS queue using long polling.

func (*SQSQueue) PutMessages

func (q *SQSQueue) PutMessages(messages []string) error

PutMessages enqueue given messages to SQS queue.

Since SQS supports at maximum 10 messages for one batch operation, we split the given slice by 10 times.

Jump to

Keyboard shortcuts

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