sqs

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	DeadLetterQueueURL string
	QueueName          string
	QueueURL           *string
	// desired / default delay durations
	MaxDelay       time.Duration
	ReconnectDelay time.Duration
	ResendDelay    time.Duration
	RoutingKey     string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, urlString string) (*Client, error)

New creates a single SQS client

func (*Client) Close

func (client *Client) Close() error

Close will cleanly shutdown the channel and connection.

func (*Client) Consume

func (client *Client) Consume(ctx context.Context, visibilitySeconds int32) (<-chan types.Message, error)

Consume will continuously put queue messages on the channel.

func (*Client) Push

func (client *Client) Push(ctx context.Context, record queues.Record) error

Push will push data onto the queue and wait for a response. TODO: work on resend with delay...

func (*Client) PushBatch

func (client *Client) PushBatch(ctx context.Context, recordchan <-chan queues.Record) error

Push will push data onto the queue and wait for a response. TODO: work on resend with delay????

func (*Client) PushDeadRecord

func (client *Client) PushDeadRecord(ctx context.Context, record types.Message) error

PushDeadRecord will push an erroneous record onto the DLQ. TODO: work on resend with delay...

func (*Client) RemoveMessage

func (client *Client) RemoveMessage(ctx context.Context, msg types.Message) error

Remove a message from the SQS queue

func (*Client) SetMessageVisibility

func (client *Client) SetMessageVisibility(ctx context.Context, msg types.Message, seconds int32) error

Remove a message from the SQS queue

type SQSError

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

Jump to

Keyboard shortcuts

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