rabbitmq

package
v4.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(session *RabbitMQ) error

Types

type Events added in v4.8.0

type Events = map[events.Key][]events.Consumer

type Queues added in v4.8.0

type Queues = map[events.Key]*Recipient

type RabbitMQ

type RabbitMQ struct {
	*amqp.Connection
	*amqp.Channel
	loggers.Logger
	// contains filtered or unexported fields
}

func Open

func Open(uri string, exchange string, queues Queues, logger loggers.Logger) (*RabbitMQ, error)

func (*RabbitMQ) AddExchange added in v4.8.0

func (r *RabbitMQ) AddExchange(name string) error

func (*RabbitMQ) AddQueue

func (r *RabbitMQ) AddQueue(name events.Recipient) error

func (*RabbitMQ) AddQueueEventBind added in v4.8.0

func (r *RabbitMQ) AddQueueEventBind(queue events.Recipient, bindingKey, routingKey events.Key, attributes, meta reflect.Type) error

func (*RabbitMQ) Publish added in v4.8.0

func (r *RabbitMQ) Publish(event *events.Event) error

func (*RabbitMQ) Subscribe added in v4.8.0

func (r *RabbitMQ) Subscribe(key events.Key, consumer events.Consumer) error

func (*RabbitMQ) Unmarshal added in v4.8.0

func (r *RabbitMQ) Unmarshal(data []byte, attributes, meta reflect.Type, event *events.Event) error

type Recipient added in v4.8.0

type Recipient struct {
	Name             events.Recipient
	BindingKey       events.Key
	Attributes, Meta reflect.Type
}

Jump to

Keyboard shortcuts

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