Function
toggleConsumptionFlow
(client sarama.ConsumerGroup, isPaused *bool)
Source from the content-addressed store, hash-verified
| 149 | } |
| 150 | |
| 151 | func toggleConsumptionFlow(client sarama.ConsumerGroup, isPaused *bool) { |
| 152 | if *isPaused { |
| 153 | client.ResumeAll() |
| 154 | log.Println("Resuming consumption") |
| 155 | } else { |
| 156 | client.PauseAll() |
| 157 | log.Println("Pausing consumption") |
| 158 | } |
| 159 | |
| 160 | *isPaused = !*isPaused |
| 161 | } |
| 162 | |
| 163 | // Consumer represents a Sarama consumer group consumer |
| 164 | type Consumer struct { |
Tested by
no test coverage detected