Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

major refactoring #5

Merged
merged 4 commits into from
Feb 15, 2025
Merged

major refactoring #5

merged 4 commits into from
Feb 15, 2025

Conversation

umputun
Copy link
Member

@umputun umputun commented Feb 15, 2025

Usage of the current version is a bit cumbersome, and making new strategies is not trivial. The new version solves it with a simpler model, ready-to-go predefined strategies, and a much simpler way to create custom strategies.

Generally, this is an improvement that makes the repeater easier to use in real life.

- Implement retry strategies: FixedDelay and Backoff with types (Constant, Linear, Exponential) and options for max delay and jitter.
- Add Repeater struct to handle retry logic, providing NewBackoff and NewFixed constructor functions.
- Include error handling with immediate termination on specified critical errors, including ErrAny for stopping on any error.
- Integrate full testing suite to confirm correct behavior of retry mechanisms, including context cancellation respects.
- Update README with usage examples and detailed explanations of strategies and options.
- Configure GitHub Actions CI for building and testing Go v1.24 codebase with coverage reporting.
@umputun umputun merged commit 1da8089 into master Feb 15, 2025
5 checks passed
@umputun umputun deleted the v2 branch February 15, 2025 06:46
@coveralls
Copy link

Pull Request Test Coverage Report for Build 13342673079

Details

  • 92 of 92 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 12380495374: 0.0%
Covered Lines: 100
Relevant Lines: 100

💛 - Coveralls

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.

2 participants