Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrSinkAlreadyClosed = errors.New("listener.Sink: already closed")
ErrSinkAlreadyClosed is returned by listener.Sink when attempting to close the returned Closer more than once.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel interface { io.Closer Qos(prefetchCount, prefetchSize int, global bool) error Consume(queue, name string, autoAck, exclusive, noLocal, noWait bool, args amqp.Table) (<-chan amqp.Delivery, error) }
Channel is the channel interface the Listener uses to listen and serve incoming messages.
type Connection ¶
Connection is the connection interface the Listener uses to listen and serve incoming messages.
type Func ¶
Func is an inline function that implements the Listener interface. Useful for mocking or stateless Listener implementations.
type Listener ¶
Listener listens for incoming messages using an amqp.Connection or amqp.Channel provided, and calls the specified message handler to handle all incoming messages.
Returns a Closer interface to stop listening to incoming messages.
func Sink ¶
Sink allows for listening from multiple Listeners, by maintaining an amqp.Delivery sink to which all the messages are sent.
Returns nil if no listeners are supplied.
func UseDedicatedChannel ¶
UseDedicatedChannel creates a new, dedicated amqp.Channel to be used exclusively by the wrapped Listener.