(ctx context.Context, wait time.Duration)
| 3479 | } |
| 3480 | |
| 3481 | func waitForCooldown(ctx context.Context, wait time.Duration) error { |
| 3482 | if wait <= 0 { |
| 3483 | return nil |
| 3484 | } |
| 3485 | timer := time.NewTimer(wait) |
| 3486 | defer timer.Stop() |
| 3487 | select { |
| 3488 | case <-ctx.Done(): |
| 3489 | return ctx.Err() |
| 3490 | case <-timer.C: |
| 3491 | return nil |
| 3492 | } |
| 3493 | } |
| 3494 | |
| 3495 | // MarkResult records an execution result and notifies hooks. |
| 3496 | func (m *Manager) MarkResult(ctx context.Context, result Result) { |
no test coverage detected