-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
update circuitbreaker document #1808
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1808 +/- ##
=======================================
Coverage 84.58% 84.58%
=======================================
Files 308 308
Lines 6799 6799
Branches 1049 1049
=======================================
Hits 5751 5751
Misses 839 839
Partials 209 209
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going through #1776 (comment) looks like just a diagram is needed to complete the suggestions.
## Defaults Align
Update the alignment of the table a bit more.
@atawLee Do you need some help with the diagram? I can create one if you wish. |
Yes, I would really appreciate your help with the diagram. |
Here it is: sequenceDiagram
autonumber
actor C as Caller
participant P as Pipeline
participant CB as CircuitBreaker
participant BDG as BreakDurationGenerator
participant D as DecoratedUserCallback
C->>P: Calls ExecuteAsync
P->>CB: Calls ExecuteCore
Note over CB: Closed state
CB->>+D: Invokes
D->>-CB: Fails
Note over CB: Moves to Open state
CB->>+BDG: Calls Generator
BDG->>-CB: Returns calculated <br/> duration
Note over CB: Break duration start
CB->>P: Propagates failure
P->>C: Propagates failure
C->>P: Calls ExecuteAsync
P->>CB: Calls ExecuteCore
CB-->>CB: Rejects request
CB->>P: Throws <br/>BrokenCircuitException
P->>C: Propagates exception
C->>P: Calls ExecuteAsync
P->>CB: Calls ExecuteCore
Note over CB: Break duration end
Note over CB: Moves to HalfOpen state
CB->>+D: Invokes
D->>-CB: Returns result
Note over CB: Moves to Closed state
CB->>P: Returns result
P->>C: Returns result
And the code:
Enjoy 💪 |
|
Co-authored-by: Martin Costello <martin@martincostello.com>
#1776
Update documentation for the CircuitBreaker's BreakDurationGenerator
Confirm the following