azsqs

package
v3.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory(sqs *sqs.SQS, accountID string) taskq.Factory

Types

type Queue

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

func NewQueue

func NewQueue(sqs *sqs.SQS, accountID string, opt *taskq.QueueOptions) *Queue

func (*Queue) Add

func (q *Queue) Add(msg *taskq.Message) error

Add adds message to the queue.

func (*Queue) Close

func (q *Queue) Close() error

Close is like CloseTimeout with 30 seconds timeout.

func (*Queue) CloseTimeout

func (q *Queue) CloseTimeout(timeout time.Duration) error

CloseTimeout closes the queue waiting for pending messages to be processed.

func (*Queue) Consumer

func (q *Queue) Consumer() *taskq.Consumer

func (*Queue) Delete

func (q *Queue) Delete(msg *taskq.Message) error

Delete deletes the message from the queue.

func (*Queue) GetAddQueue

func (q *Queue) GetAddQueue() *memqueue.Queue

func (*Queue) GetDeleteQueue

func (q *Queue) GetDeleteQueue() *memqueue.Queue

func (*Queue) Len

func (q *Queue) Len() (int, error)

func (*Queue) Name

func (q *Queue) Name() string

func (*Queue) Options

func (q *Queue) Options() *taskq.QueueOptions

func (*Queue) Purge

func (q *Queue) Purge() error

Purge deletes all messages from the queue using SQS API.

func (*Queue) Release

func (q *Queue) Release(msg *taskq.Message) error

func (*Queue) ReserveN

func (q *Queue) ReserveN(
	ctx context.Context, n int, waitTimeout time.Duration,
) ([]taskq.Message, error)

func (*Queue) String

func (q *Queue) String() string

Jump to

Keyboard shortcuts

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