rabbit

package
v0.0.0-...-52cd6b4 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: Apache-2.0 Imports: 4 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 {
	Close() error
	Run(handler rabbitmq.Handler) error
}

func NewRabbitConsumer

func NewRabbitConsumer(logger *zap.Logger, cfg configuration.RabbitConfig, routingKey string) (Consumer, error)

type ConsumerImpl

type ConsumerImpl struct {
	Conn     *rabbitmq.Conn
	Consumer *rabbitmq.Consumer
}

func (*ConsumerImpl) Close

func (c *ConsumerImpl) Close() error

func (*ConsumerImpl) Run

func (c *ConsumerImpl) Run(handler rabbitmq.Handler) error

type ConsumerMock

type ConsumerMock struct {
	Logger *zap.Logger
}

func (*ConsumerMock) Close

func (m *ConsumerMock) Close() error

func (*ConsumerMock) Run

func (m *ConsumerMock) Run(handler rabbitmq.Handler) error

type Publisher

type Publisher interface {
	Publish(msg []byte, routingKey string, withExpiration bool) error
	Close() error
}

func NewRabbitPublisher

func NewRabbitPublisher(logger *zap.Logger, cfg configuration.RabbitConfig) (Publisher, error)

type PublisherImpl

type PublisherImpl struct {
	Conn         *rabbitmq.Conn
	Publisher    *rabbitmq.Publisher
	ExchangeName string
}

func (*PublisherImpl) Close

func (p *PublisherImpl) Close() error

func (*PublisherImpl) Publish

func (p *PublisherImpl) Publish(msg []byte, routingKey string, withExpiration bool) error

type PublisherMock

type PublisherMock struct {
	Logger *zap.Logger
}

func (*PublisherMock) Close

func (m *PublisherMock) Close() error

func (*PublisherMock) Publish

func (m *PublisherMock) Publish(msg []byte, routingKey string, withExpiration bool) error

Jump to

Keyboard shortcuts

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