[#2164] network/cache: Do not reconnect to failed clients immediately

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2022-12-19 17:47:28 +03:00 committed by Anton Nikiforov
parent f3caf6acfe
commit 6f5edac730
5 changed files with 120 additions and 21 deletions

View file

@ -0,0 +1,14 @@
package internal
import clientcore "github.com/TrueCloudLab/frostfs-node/pkg/core/client"
type errorReporter interface {
ReportError(error)
}
// ReportError drops client connection if possible.
func ReportError(c clientcore.Client, err error) {
if ce, ok := c.(errorReporter); ok {
ce.ReportError(err)
}
}