Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrClosedUnexpectedly = errors.New("channel closed unexpectedly") ErrNotInitialized = errors.New("not initialized") )
Functions ¶
This section is empty.
Types ¶
type ConfigOption ¶
type ConfigOption func(*MessageBroker)
func WithConsumer ¶
func WithConsumer(name string, prefetchCount int) ConfigOption
func WithStateReporter ¶
func WithStateReporter(f func(bool)) ConfigOption
type MessageBroker ¶
type MessageBroker struct {
sync.RWMutex
Connection *amqp.Connection
Channel *amqp.Channel
Queue *amqp.Queue
Msgs <-chan amqp.Delivery
// contains filtered or unexported fields
}
func NewMessageBroker ¶
func NewMessageBroker(address, user, password, queue string, opts ...ConfigOption) (*MessageBroker, error)
func (*MessageBroker) Close ¶
func (mb *MessageBroker) Close() error
Click to show internal directories.
Click to hide internal directories.