sqs

package
v0.0.0-...-ce1b770 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

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

Consumer represents SQS consumer.

func NewConsumer

func NewConsumer(awsConfig aws.Config, url string, opts ...ConsumerOption) (*Consumer, error)

New instances of a Consumer to consume SQS messages.

func (*Consumer) DeleteMessage

func (c *Consumer) DeleteMessage(ctx context.Context, id *string) error

DeleteMessage deletes messages from SQS.

func (*Consumer) GetMessages

func (c *Consumer) GetMessages(ctx context.Context) ([]aws_sqs_types.Message, error)

GetMessages retrieves messages from SQS.

func (*Consumer) GetQueueAttributes

func (c *Consumer) GetQueueAttributes(ctx context.Context) (*aws_sqs.GetQueueAttributesOutput, error)

GetQueueAttributes get queue attributes.

func (*Consumer) GetQueueUrl

func (c *Consumer) GetQueueUrl() string

GetQueueUrl returns queue url.

func (*Consumer) GetVisibilityTimeout

func (c *Consumer) GetVisibilityTimeout() time.Duration

GetVisibilityTimeout returns visibility timeout.

type ConsumerOption

type ConsumerOption func(*Consumer)

ConsumerOption represents a consumer option function.

func WithMaxMessages

func WithMaxMessages(v int32) ConsumerOption

WithMaxMessages allows to specify an maximum number of messages to return when setting a value.

func WithVisibilityTimeout

func WithVisibilityTimeout(v int32) ConsumerOption

WithVisibilityTimeout allows to specify a visibility timeout when setting a value.

func WithWaitTimeSeconds

func WithWaitTimeSeconds(v int32) ConsumerOption

WithWaitTimeSeconds allows to specify a wait time when setting a value.

Jump to

Keyboard shortcuts

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