sqs

package module
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const EnvConfigSourceSQS = "CONFIG_SWARM_SOURCE_SQS"

Environment variable to config event source

View Source
const Version = "broker/sqs/v0.20.2"

Variables

This section is empty.

Functions

func New

func New(queue string, opts ...Option) (*kernel.Kernel, error)

Create enqueue & dequeue routine to AWS SQS

func NewDequeuer added in v0.20.0

func NewDequeuer(queue string, opts ...Option) (*kernel.Dequeuer, error)

Create dequeue routine to AWS SQS

func NewEnqueuer added in v0.20.0

func NewEnqueuer(queue string, opts ...Option) (*kernel.Enqueuer, error)

Create enqueue routine to AWS SQS

Types

type Client

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

func (*Client) Ack

func (cli *Client) Ack(ctx context.Context, digest string) error

func (Client) Ask

func (cli Client) Ask(ctx context.Context) ([]swarm.Bag, error)

Deq dequeues message from broker

func (*Client) Enq

func (cli *Client) Enq(ctx context.Context, bag swarm.Bag) error

Enq enqueues message to broker

func (*Client) Err added in v0.20.0

func (cli *Client) Err(ctx context.Context, digest string, err error) error

type Option added in v0.20.0

type Option func(*Client)

func WithBatchSize added in v0.20.0

func WithBatchSize(batch int) Option

Configure's SQS batch size. Note: AWS SQS limits the MaxNumberOfMessages to 10 per poller. This config increases number of poller

func WithConfig added in v0.20.0

func WithConfig(opts ...swarm.Option) Option

Global "kernel" configuration.

func WithService added in v0.20.0

func WithService(service SQS) Option

Passes AWS SQS client instance to broker

type SQS

SQS

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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