rabbit

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConnection

func GetConnection(user, password, host string, port int, vHost string) (*amqp.Connection, error)

Types

type Consumer

type Consumer struct {
	Conn         *amqp.Connection
	QueueName    string
	ExchangeName string
}

Consumer for receiving AMPQ events

func NewConsumer

func NewConsumer(conn *amqp.Connection, r RInfo, exchangeName string, queueName string) (Consumer, error)

NewConsumer returns a new Consumer

type Emitter

type Emitter struct {
	Conn         *amqp.Connection
	ExchangeName string
}

Emitter for publishing AMQP events

func NewEventEmitter

func NewEventEmitter(conn *amqp.Connection, r RInfo, exchangeName string) (Emitter, error)

NewEventEmitter returns a new event.Emitter object ensuring that the object is initialised, without error

type RInfo

type RInfo interface {
	DeclareQueue(ch *amqp.Channel, queueName string) (amqp.Queue, error)
	DeclareExchange(ch *amqp.Channel, exchangeName string) error
}

Jump to

Keyboard shortcuts

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