Documentation
¶
Index ¶
- Variables
- func DeliveryGetBody(d *amqp.Delivery) interface{}
- func DeliveryLogHandler(d *amqp.Delivery) interface{}
- type Consumer
- func (c *Consumer) Abort()
- func (c *Consumer) Bind(e Exchange) error
- func (c *Consumer) Consume(f func(*amqp.Delivery) interface{}, expectResult bool) error
- func (c *Consumer) Flush()
- func (c *Consumer) SetArgs(args amqp.Table)
- func (c *Consumer) SetExclusive(excl bool)
- func (c *Consumer) SetNoAck(noAck bool)
- func (c *Consumer) SetNoLocal(noloc bool)
- func (c *Consumer) SetNoWait(noWait bool)
- func (c *Consumer) SetQueue(q *Queue) error
- func (c *Consumer) SetTag(tag string)
- func (c *Consumer) SetWorkers(workers int)
- func (c *Consumer) Shutdown(flush bool) error
- func (c *Consumer) Wait()
- func (c *Consumer) Work(workerID int, deliveries <-chan amqp.Delivery, ...)
- type Exchange
- type Queue
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNilConsumerQueue returned error when consumer queue is Nil ErrNilConsumerQueue = fmt.Errorf("Nil Consumer Queue") )
Functions ¶
func DeliveryGetBody ¶
DeliveryGetBody is a Helper that just return the body of the delively as a string
func DeliveryLogHandler ¶
DeliveryLogHandler is an Helper to log the delivery
Types ¶
type Consumer ¶
type Consumer struct {
Config *amqpconfig.Config
Queue *amqp.Queue
OutputChan chan interface{}
// contains filtered or unexported fields
}
Consumer structure
func NewConsumer ¶
func NewConsumer(config *amqpconfig.Config, q *Queue) (c Consumer, err error)
NewConsumer creates a new consumer not using TLS
func (*Consumer) Flush ¶
func (c *Consumer) Flush()
Flush the OutputChan of the conusmer to prevent deadlocks
func (*Consumer) SetExclusive ¶
SetExclusive exclusive setter
func (*Consumer) SetWorkers ¶
SetWorkers sets the number of concurrent workers
Click to show internal directories.
Click to hide internal directories.