Documentation ¶
Index ¶
- func DoWithTries(fn func() error, attempts int, delay time.Duration) (err error)
- type RabbitMQConnection
- func (rmq *RabbitMQConnection) Close()
- func (rmq *RabbitMQConnection) Consume(queue string) (<-chan amqp.Delivery, func(), error)
- func (rmq *RabbitMQConnection) GetChannel() (*amqp.Channel, error)
- func (rmq *RabbitMQConnection) InitQueues(queues []string) error
- func (rmq *RabbitMQConnection) Publish(queue string, message []byte) error
- func (rmq *RabbitMQConnection) ReleaseChannel(ch *amqp.Channel)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RabbitMQConnection ¶
type RabbitMQConnection struct { Connection *amqp.Connection ChannelPool chan *amqp.Channel }
func NewRabbitMQConnection ¶
func NewRabbitMQConnection(uri string, poolSize int) (*RabbitMQConnection, error)
func (*RabbitMQConnection) Close ¶
func (rmq *RabbitMQConnection) Close()
func (*RabbitMQConnection) Consume ¶
func (rmq *RabbitMQConnection) Consume(queue string) (<-chan amqp.Delivery, func(), error)
func (*RabbitMQConnection) GetChannel ¶
func (rmq *RabbitMQConnection) GetChannel() (*amqp.Channel, error)
func (*RabbitMQConnection) InitQueues ¶
func (rmq *RabbitMQConnection) InitQueues(queues []string) error
func (*RabbitMQConnection) Publish ¶
func (rmq *RabbitMQConnection) Publish(queue string, message []byte) error
func (*RabbitMQConnection) ReleaseChannel ¶
func (rmq *RabbitMQConnection) ReleaseChannel(ch *amqp.Channel)
Click to show internal directories.
Click to hide internal directories.