Add onDegraded, degradedThreshold, circuitBreakDuration to createServicePolicy#5143
Merged
Add onDegraded, degradedThreshold, circuitBreakDuration to createServicePolicy#5143
onDegraded, degradedThreshold, circuitBreakDuration to createServicePolicy#5143Conversation
This commit is a continuation of a previous commit which added a utility function for use in service classes which ensures that they follow the circuit breaker and retry patterns. This commit adds two more options to `createServicePolicy`: - `onDegraded`, a callback which handles when the service succeeds but takes too long to run - `degradedThreshold`, the duration which counts as "too long"
7420f24 to
b2c06f4
Compare
onDegraded and degradedThreshold to createServicePolicyonDegraded, degradedThreshold, circuitBreakDuration to createServicePolicy
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.
Explanation
This commit is a continuation of a previous commit which added a utility function for use in service classes which ensures that they follow the circuit breaker and retry patterns.
This commit adds three more options to
createServicePolicy:onDegraded, a callback which handles when the service succeeds but takes too long to rundegradedThreshold, the duration which counts as "too long"circuitBreakDuration, which governs how long the circuit stays open after breaking before the service is re-evaluatedReferences
Progresses #4994.
Changelog
(Updated in PR)
Checklist