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

Method Declare

client.go:44–53  ·  view source on GitHub ↗

Declare used to declare queues/exchanges/bindings. Declaration is saved and will be re-run every time Client gets connection

(d []Declaration)

Source from the content-addressed store, hash-verified

42// Declare used to declare queues/exchanges/bindings.
43// Declaration is saved and will be re-run every time Client gets connection
44func (c *Client) Declare(d []Declaration) {
45 c.l.Lock()
46 defer c.l.Unlock()
47 c.declarations = append(c.declarations, d...)
48 if ch, err := c.channel(); err == nil {
49 for _, declare := range d {
50 declare(ch)
51 }
52 }
53}
54
55// Consume used to declare consumers
56func (c *Client) Consume(cons *Consumer) {

Callers 8

ExampleFunction · 0.95
TestClient_DeclareFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95

Calls 1

channelMethod · 0.95

Tested by 2

ExampleFunction · 0.76
TestClient_DeclareFunction · 0.76