mirror of
https://github.com/tmrts/go-patterns.git
synced 2024-11-22 04:56:09 +03:00
Update circuit-breaker.md
This commit is contained in:
parent
f978e42036
commit
55615d2cdf
@ -67,7 +67,7 @@ func Breaker(c Circuit, failureThreshold uint32) Circuit {
|
||||
|
||||
return func(ctx context) error {
|
||||
if cnt.ConsecutiveFailures() >= failureThreshold {
|
||||
canRetry := func(cnt Counter) {
|
||||
canRetry := func(cnt Counter) bool {
|
||||
backoffLevel := Cnt.ConsecutiveFailures() - failureThreshold
|
||||
|
||||
// Calculates when should the circuit breaker resume propagating requests
|
||||
|
Loading…
Reference in New Issue
Block a user