Consumer implements sarama's Consumer interface for testing purposes. Before you can start consuming from this consumer, you have to register topic/partitions using ExpectConsumePartition, and set expectations on them.
| 11 | // Before you can start consuming from this consumer, you have to register |
| 12 | // topic/partitions using ExpectConsumePartition, and set expectations on them. |
| 13 | type Consumer struct { |
| 14 | l sync.Mutex |
| 15 | t ErrorReporter |
| 16 | config *sarama.Config |
| 17 | partitionConsumers map[string]map[int32]*PartitionConsumer |
| 18 | metadata map[string][]int32 |
| 19 | } |
| 20 | |
| 21 | // NewConsumer returns a new mock Consumer instance. The t argument should |
| 22 | // be the *testing.T instance of your test method. An error will be written to it if |
nothing calls this directly
no outgoing calls
no test coverage detected