queue

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseConsumer

func CloseConsumer(consumer Consumer, log logger.Logger)

Types

type Consumer

type Consumer interface {
	io.Closer
	StartConsuming(
		handler rabbitmq.Handler,
		queue string,
		routingKeys []string,
		optionFuncs ...func(*rabbitmq.ConsumeOptions),
	) error
}

Consumer is just an interface for the library consumer which doesn't have one.

func NewConsumer

func NewConsumer(conf config.QueueConfig, log logger.Logger) (Consumer, error)

type Listener

type Listener interface {
	//Start listening queues
	Start(
		ctx context.Context,
		consumer Consumer,
		config *config.QueueConfig,
		handler handler.Handler,
	) error
}

Listener represents the consumer wrapper with the method to start listening for all events for this service

func NewListener

func NewListener() Listener

type ListenerImpl

type ListenerImpl struct {
}

func (*ListenerImpl) Start

func (listener *ListenerImpl) Start(
	ctx context.Context,
	consumer Consumer,
	config *config.QueueConfig,
	handler handler.Handler,
) error

Directories

Path Synopsis
mocks
Package handler is a generated GoMock package.
Package handler is a generated GoMock package.
Package mock_queue is a generated GoMock package.
Package mock_queue is a generated GoMock package.
mocks
Package publisher is a generated GoMock package.
Package publisher is a generated GoMock package.

Jump to

Keyboard shortcuts

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