Conversation
…sers to define a custom order for resilience strategies. This refactoring enables flexible policy composition through the new Policy API while maintaining backward compatibility for the existing opinionated defaults. Key changes: - Implement Policy type with NewPolicy, Do, and DoErr methods. - Refactor core execution logic into a middleware/interceptor pattern. - Add Bulkhead strategy for concurrency limiting in bulkhead.go. - Add WithTimeout option and timeoutMiddleware. - Update Config and Option to support dynamic pipeline building. - Refactor executeHedged to utilize the modular attempt pipeline. - Comprehensive documentation updates in README.md and docs/SPEC.md. - New tests for policy composition and ordering in policy_composition_test.go.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #31 +/- ##
===========================================
- Coverage 93.27% 80.82% -12.45%
===========================================
Files 9 11 +2
Lines 476 652 +176
===========================================
+ Hits 444 527 +83
- Misses 23 103 +80
- Partials 9 22 +13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Implement a modular resilience engine with support for custom policy composition and new defense patterns. Fixes #29 Fixes #28 Fixes #27 Key changes: - Policy API: NewPolicy for custom ordering of resilience layers (#29). - Bulkhead: Semaphore-based concurrency isolation (#27). - Rate Limiting: Time-based token bucket for request throttling (#28). - Middleware: Modular pipeline for Retry, CB, Bulkhead, and RateLimit. - Telemetry: Enhanced Instrumenter for bulkhead and rate-limit events. - Examples: Added standalone examples for bulkhead and ratelimiter. - Documentation: Updated README.md and SPEC.md with new patterns.
Implement a modular resilience engine with support for custom policy composition and new defense patterns. Key changes: - Policy API: NewPolicy for custom ordering of resilience layers (#29). - Bulkhead: Semaphore-based concurrency isolation (#27). - Rate Limiting: Time-based token bucket for request throttling (#28). - Middleware: Modular pipeline for Retry, CB, Bulkhead, and RateLimit. - Telemetry: Enhanced Instrumenter for bulkhead and rate-limit events. - Examples: Added standalone examples for bulkhead and ratelimiter. - Documentation: Updated README.md and SPEC.md with new patterns. - Articles: New deep dives into Bulkhead Isolation and Precise Rate Limiting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a modular middleware-based execution pipeline that allows users to define a custom order for resilience strategies. This refactoring enables flexible policy composition through the new Policy API while maintaining backward compatibility for the existing opinionated defaults.
Fixes #29
Fixes #28
Fixes #27
Key changes: