feat: optimize circuit breaker algorithm (#3897)

This commit is contained in:
Kevin Wan
2024-02-15 20:29:24 +08:00
committed by GitHub
parent 9c17499757
commit 1303e0fe6f
6 changed files with 35 additions and 21 deletions

View File

@@ -24,12 +24,11 @@ func (b nopBreaker) DoWithAcceptable(req func() error, _ Acceptable) error {
return req()
}
func (b nopBreaker) DoWithFallback(req func() error, _ func(err error) error) error {
func (b nopBreaker) DoWithFallback(req func() error, _ Fallback) error {
return req()
}
func (b nopBreaker) DoWithFallbackAcceptable(req func() error, _ func(err error) error,
_ Acceptable) error {
func (b nopBreaker) DoWithFallbackAcceptable(req func() error, _ Fallback, _ Acceptable) error {
return req()
}