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

Method Consume

client.go:56–63  ·  view source on GitHub ↗

Consume used to declare consumers

(cons *Consumer)

Source from the content-addressed store, hash-verified

54
55// Consume used to declare consumers
56func (c *Client) Consume(cons *Consumer) {
57 c.l.Lock()
58 defer c.l.Unlock()
59 c.consumers[cons] = struct{}{}
60 if ch, err := c.channel(); err == nil {
61 go cons.serve(c, ch)
62 }
63}
64
65func (c *Client) deleteConsumer(cons *Consumer) {
66 c.l.Lock()

Callers 5

ExampleFunction · 0.95
TestClient_ConsumeFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95

Calls 2

channelMethod · 0.95
serveMethod · 0.45

Tested by 2

ExampleFunction · 0.76
TestClient_ConsumeFunction · 0.76