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

Function NewConsumer

consumer.go:98–109  ·  view source on GitHub ↗

NewConsumer Consumer's constructor

(q *Queue, opts ...ConsumerOpt)

Source from the content-addressed store, hash-verified

96
97// NewConsumer Consumer's constructor
98func NewConsumer(q *Queue, opts ...ConsumerOpt) *Consumer {
99 c := &Consumer{
100 q: q,
101 deliveries: make(chan amqp.Delivery),
102 errs: make(chan error, 100),
103 stop: make(chan struct{}),
104 }
105 for _, o := range opts {
106 o(c)
107 }
108 return c
109}
110
111// Qos on channel
112func Qos(count int) ConsumerOpt {

Callers 2

TestNewConsumerFunction · 0.85
newTestConsumerFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestNewConsumerFunction · 0.68
newTestConsumerFunction · 0.68