Documentation
¶
Index ¶
- type Consumer
- func (c *Consumer) AnnounceQueue(queueName string, args map[string]interface{}) (<-chan amqp.Delivery, error)
- func (c *Consumer) AutoRecover()
- func (c *Consumer) Connect() error
- func (c *Consumer) Consume(queueName string, args map[string]interface{}, f fn) error
- func (c *Consumer) ReConnect() error
- type Publisher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer struct {
Connection *amqp.Connection
Channel *amqp.Channel
ExchangeName string
// contains filtered or unexported fields
}
func NewConsumer ¶
func (*Consumer) AnnounceQueue ¶
func (c *Consumer) AnnounceQueue(queueName string, args map[string]interface{}) (<-chan amqp.Delivery, error)
AnnounceQueue declares and consume a queue
func (*Consumer) AutoRecover ¶
func (c *Consumer) AutoRecover()
AutoRecover will recover connection and consumers
type Publisher ¶
type Publisher struct {
Connection *amqp.Connection
Channel *amqp.Channel
ExchangeName string
}
func NewPublisher ¶
Click to show internal directories.
Click to hide internal directories.