-
Notifications
You must be signed in to change notification settings - Fork 2k
resiliency.PolicyDefined
returns the policy object
#5050
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
resiliency.PolicyDefined
returns the policy object
#5050
Conversation
spin-off from dapr#4903 Co-authored-by: Hal Spang <halspang@microsoft.com> Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## master #5050 +/- ##
==========================================
+ Coverage 65.32% 65.40% +0.08%
==========================================
Files 114 114
Lines 12650 12684 +34
==========================================
+ Hits 8263 8296 +33
- Misses 3798 3799 +1
Partials 589 589
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
…iliency-policy
@@ -840,6 +897,11 @@ func (e *circuitBreakerInstances) Remove(name string) { | |||
e.Unlock() | |||
} | |||
|
|||
// HasRetries returns true if the policy is configured to have more than 1 retry. | |||
func (p PolicyDescription) HasRetries() bool { |
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.
any specific reason this has to be an exported function in this PR?
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.
That is needed in #4903
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.
Can you follow up with a PR renaming PolicyDefined() to GetPolicy()?
This is another spin-off from #4903
It changes the
resiliency.PolicyDefined
method to return the actual policy object and not just a boolean indicating whether a policy exists.This was necessary for #4903, but I co-authored this change with @halspang who said he thinks we need this for other things too, in the future.