rabbitmq

package
v0.0.0-...-144a274 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exchange

type Exchange struct {
	Name        string
	Type        string
	Durable     bool
	AutoDeleted bool
	Internal    bool
	NoWait      bool
	Arguments   amqp.Table
}

Exchange defines a wrapper for a RabbitMQ exchange specification.

type QueueDeclare

type QueueDeclare struct {
	Name        string
	Durable     bool
	AutoDeleted bool
	Exclusive   bool
	NoWait      bool
	Arguments   amqp.Table
}

QueueDeclare defines a wrapper for a RabbitMQ queue specification.

type Receiver

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

Receiver defines the information required to connect to the RabbitMQ instance.

func NewReceiver

func NewReceiver(
	uri string,
	exchange Exchange,
	queue QueueDeclare,
	consumerTag string) *Receiver

NewReceiver creates a new instance of a Receiver with the RabbitMQ connection uri, the general exchange and queue specification that contains the data to consume.

func (*Receiver) Connect

func (q *Receiver) Connect(
	ctx context.Context,
	msgs chan transform.DataBlock,
	errorChan chan error,
	logger *log.Entry) error

Connect implements the Queue interface

func (*Receiver) ConnectCustomRetry

func (q *Receiver) ConnectCustomRetry(
	ctx context.Context,
	msgs chan transform.DataBlock,
	errorChan chan error,
	maxRetries int,
	retryFuncTime func(int) int,
	loggerInput *log.Entry) error

ConnectCustomRetry implements the Queue interface

Jump to

Keyboard shortcuts

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