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