Ongoing returns true if caller should keep going
()
| 50 | |
| 51 | // Ongoing returns true if caller should keep going |
| 52 | func (b *Backoff) Ongoing() bool { |
| 53 | // Stop if Context has errored or max retry count is exceeded |
| 54 | return b.ctx.Err() == nil && (b.cfg.MaxRetries == 0 || b.numRetries < b.cfg.MaxRetries) |
| 55 | } |
| 56 | |
| 57 | // Err returns the reason for terminating the backoff, or nil if it didn't terminate. |
| 58 | func (b *Backoff) Err() error { |