amazonsqs

package
v0.18.5 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmazonSQS

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

AmazonSQS Basic structure with SQS information

func New

func New(accessKeyID, secretKey, region string) (*AmazonSQS, error)

New creates a new AmazonSQS

func (*AmazonSQS) AddReceivers

func (s *AmazonSQS) AddReceivers(queues ...string)

AddReceivers takes queue urls and adds them to the internal queues list. The Send method will send a given message to all those queues.

func (AmazonSQS) Send

func (s AmazonSQS) Send(ctx context.Context, subject, message string) error

Send takes a message subject and a message body and sends them to all previously set queues. This method is not atomic, so if one of the messages fails to be sent the other one may already have been published.

type SQSSendMessageAPI

type SQSSendMessageAPI interface {
	SendMessage(ctx context.Context,
		params *sqs.SendMessageInput,
		optFns ...func(*sqs.Options)) (*sqs.SendMessageOutput, error)
}

SQSSendMessageAPI Basic interface to send messages through SQS.

type SQSSendMessageClient

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

SQSSendMessageClient Client specific for SQS using aws sdk v2.

func (SQSSendMessageClient) SendMessage

func (s SQSSendMessageClient) SendMessage(ctx context.Context,
	params *sqs.SendMessageInput,
	optFns ...func(*sqs.Options)) (*sqs.SendMessageOutput, error)

SendMessage Send a message to SQS.

Jump to

Keyboard shortcuts

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