Timer is an interface similar to what time.Timer provides, but with C as a function returning the channel instead of accessing a plain struct property, so we can mock it. See time.Timer docs for more details
| 8 | // instead of accessing a plain struct property, so we can mock it. |
| 9 | // See time.Timer docs for more details |
| 10 | type Timer interface { |
| 11 | // C returns the channel where the tick will be signaled, like Timer.C in time package |
| 12 | C() <-chan time.Time |
| 13 | |
| 14 | // Stop stops the timer, see exact docs on time.Timer for information about channel draining when Stop returns false |
| 15 | Stop() bool |
| 16 | } |
| 17 | |
| 18 | //go:generate mockery -case underscore -outpkg timexmock -output timexmock -name Timer |
| 19 | type timer struct { |
no outgoing calls
no test coverage detected