Documentation ¶
Index ¶
- type QueueConnection
- func (c *QueueConnection) BindQueueToExchange(queueName string, exchangeName string) error
- func (c *QueueConnection) Close() error
- func (c *QueueConnection) Consume(queueName string) (<-chan amqp.Delivery, error)
- func (c *QueueConnection) ExchangeDeclare(exchangeName string, exchangeType string) error
- func (c *QueueConnection) Publish(exchangeName string, routingKey string, contentType string, body string) error
- func (c *QueueConnection) QueueDeclare(queueName string) (amqp.Queue, error)
- type QueueManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QueueConnection ¶
type QueueConnection struct { Connection *amqp.Connection Channel *amqp.Channel HandleChannelClose func(message string) HandleFatalError func(err *amqp.Error) // contains filtered or unexported fields }
func NewQueueConnection ¶
func NewQueueConnection(amqpURI string) (*QueueConnection, error)
func (*QueueConnection) BindQueueToExchange ¶
func (c *QueueConnection) BindQueueToExchange(queueName string, exchangeName string) error
func (*QueueConnection) Close ¶
func (c *QueueConnection) Close() error
func (*QueueConnection) Consume ¶
func (c *QueueConnection) Consume(queueName string) (<-chan amqp.Delivery, error)
func (*QueueConnection) ExchangeDeclare ¶
func (c *QueueConnection) ExchangeDeclare(exchangeName string, exchangeType string) error
func (*QueueConnection) QueueDeclare ¶
func (c *QueueConnection) QueueDeclare(queueName string) (amqp.Queue, error)
type QueueManager ¶
type QueueManager struct { ExchangeName string QueueName string Consumer *QueueConnection Producer *QueueConnection }
func NewQueueManager ¶
func NewQueueManager(amqpAddr string, exchangeName string, queueName string) (*QueueManager, error)
func (*QueueManager) Close ¶
func (h *QueueManager) Close() error
Click to show internal directories.
Click to hide internal directories.