WithStatsChannel will cause Executor to push a RunStats to ch after every tick. This push is blocking, so if ch is not read, the detector will hang. This should only be used in tests.
(ch chan<- Stats)
| 130 | // every tick. This push is blocking, so if ch is not read, the detector will |
| 131 | // hang. This should only be used in tests. |
| 132 | func (d *Detector) WithStatsChannel(ch chan<- Stats) *Detector { |
| 133 | d.stats = ch |
| 134 | return d |
| 135 | } |
| 136 | |
| 137 | // Start will cause the detector to detect and unhang provisioner jobs on every |
| 138 | // tick from its channel. It will stop when its context is Done, or when its |
no outgoing calls