Calculator is a generic calculation function for a Pacer.
| 21 | |
| 22 | // Calculator is a generic calculation function for a Pacer. |
| 23 | type Calculator interface { |
| 24 | // Calculate takes the current Pacer state and returns the sleep time after which |
| 25 | // the next Pacer call will be done. |
| 26 | Calculate(state State) time.Duration |
| 27 | } |
| 28 | |
| 29 | // Pacer is the primary type of the pacer package. It allows to retry calls |
| 30 | // with a configurable delay in between. |
no outgoing calls
no test coverage detected
searching dependent graphs…