producer

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProducerClient

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

func NewProducerClient

func NewProducerClient(sqsClient SQSAPI, queueUrl *string, logger *zap.Logger) *ProducerClient

func (*ProducerClient) SendMessage

func (p *ProducerClient) SendMessage(ctx context.Context, body string, attributes map[string]*sqs.MessageAttributeValue) error

Send a single message

func (*ProducerClient) SendMessagesBatch

func (p *ProducerClient) SendMessagesBatch(ctx context.Context, messages []*sqs.SendMessageBatchRequestEntry) error

Send messages in batches

type SQSAPI

type SQSAPI interface {
	SendMessageWithContext(ctx aws.Context, input *sqs.SendMessageInput, opts ...request.Option) (*sqs.SendMessageOutput, error)
	SendMessageBatchWithContext(ctx aws.Context, input *sqs.SendMessageBatchInput, opts ...request.Option) (*sqs.SendMessageBatchOutput, error)
}

Jump to

Keyboard shortcuts

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