Skip to content

Add deadline-exceeded cooldown option#11

Merged
yermakovsa merged 1 commit into
mainfrom
feat/deadline-exceeded-cooldown
Jun 28, 2026
Merged

Add deadline-exceeded cooldown option#11
yermakovsa merged 1 commit into
mainfrom
feat/deadline-exceeded-cooldown

Conversation

@yermakovsa

Copy link
Copy Markdown
Owner

Adds CooldownConfig.CountDeadlineExceeded, an opt-in setting that records attempted context.DeadlineExceeded outcomes as cooldown failures.

The current request still returns immediately and does not fail over when its context deadline is exceeded. context.Canceled does not count toward cooldown, and default behavior remains unchanged.

Includes tests for enabled deadline counting, default non-counting behavior, and canceled contexts. Updates the README with the new cooldown option.

Closes #9

@yermakovsa yermakovsa merged commit c66a728 into main Jun 28, 2026
1 check passed
@yermakovsa yermakovsa deleted the feat/deadline-exceeded-cooldown branch June 28, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optionally count context.DeadlineExceeded as a cooldown failure

1 participant