(done <-chan struct{})
| 1004 | } |
| 1005 | |
| 1006 | func (rl *rateLimiter) run(done <-chan struct{}) { |
| 1007 | for { |
| 1008 | select { |
| 1009 | case <-done: |
| 1010 | return |
| 1011 | case <-time.After(time.Minute): |
| 1012 | rl.store(0) |
| 1013 | } |
| 1014 | } |
| 1015 | } |
| 1016 | |
| 1017 | type counter struct { |
| 1018 | value uint32 |
no test coverage detected