frostfs-node/pkg/services/object/internal/client/error.go
Evgenii Stratonikov 6f5edac730 [#2164] network/cache: Do not reconnect to failed clients immediately
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2022-12-30 11:07:35 +03:00

14 lines
314 B
Go

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)
}
}