MCPcopy Create free account
hub / github.com/assembla/cony / DeclareQueue

Function DeclareQueue

declaration.go:16–32  ·  view source on GitHub ↗

DeclareQueue is a way to declare AMQP queue

(q *Queue)

Source from the content-addressed store, hash-verified

14
15// DeclareQueue is a way to declare AMQP queue
16func DeclareQueue(q *Queue) Declaration {
17 name := q.Name
18 return func(c Declarer) error {
19 q.Name = name
20 realQ, err := c.QueueDeclare(q.Name,
21 q.Durable,
22 q.AutoDelete,
23 q.Exclusive,
24 false,
25 q.Args,
26 )
27 q.l.Lock()
28 q.Name = realQ.Name
29 q.l.Unlock()
30 return err
31 }
32}
33
34// DeclareExchange is a way to declare AMQP exchange
35func DeclareExchange(e Exchange) Declaration {

Callers 2

TestDeclareQueueFunction · 0.85
TestClient_DeclareFunction · 0.85

Calls 1

QueueDeclareMethod · 0.65

Tested by 2

TestDeclareQueueFunction · 0.68
TestClient_DeclareFunction · 0.68