MCPcopy
hub / github.com/IBM/sarama / Close

Method Close

mocks/consumer.go:121–132  ·  view source on GitHub ↗

Close implements the Close method from the sarama.Consumer interface. It will close all registered PartitionConsumer instances.

()

Source from the content-addressed store, hash-verified

119// Close implements the Close method from the sarama.Consumer interface. It will close
120// all registered PartitionConsumer instances.
121func (c *Consumer) Close() error {
122 c.l.Lock()
123 defer c.l.Unlock()
124
125 for _, partitions := range c.partitionConsumers {
126 for _, partitionConsumer := range partitions {
127 _ = partitionConsumer.Close()
128 }
129 }
130
131 return nil
132}
133
134// Pause implements Consumer.
135func (c *Consumer) Pause(topicPartitions map[string][]int32) {

Implementers 2

consumerconsumer.go
Consumermocks/consumer.go

Calls 1

CloseMethod · 0.65