queue

package
v1.1.27 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: MIT Imports: 10 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 interface {
	Start(ctx context.Context, wg *sync.WaitGroup, processor Processor)
}

Consumer represents a consumer for a queue.

type Processor

type Processor interface {
	ProcessMessage(mssg string) error
}

Processor represents a queue message processor.

type SQSConfig

type SQSConfig struct {
	QueueArn    string
	Timeout     int64
	MaxWaitTime int64
	Endpoint    string
}

SQSConfig is the configuration required for an SQSConsumer.

type SQSConsumer

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

SQSConsumer is the SQS implementation of the QueueConsumer interface.

type SQSConsumerGroup

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

SQSConsumerGroup is a group of SQSConsumers.

func NewSQSConsumerGroup

func NewSQSConsumerGroup(nConsumers uint8, config SQSConfig, processor Processor, logger *log.Logger) (*SQSConsumerGroup, error)

NewSQSConsumerGroup creates a new SQSConsumerGroup.

func (*SQSConsumerGroup) Start

func (g *SQSConsumerGroup) Start(ctx context.Context, wg *sync.WaitGroup)

Start makes the consumer group start reading and processing messages from the queue.

Jump to

Keyboard shortcuts

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