forked from TrueCloudLab/frostfs-node
[#2164] network/cache: Do not reconnect to failed clients immediately
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
f3caf6acfe
commit
6f5edac730
5 changed files with 120 additions and 21 deletions
14
pkg/services/object/internal/client/error.go
Normal file
14
pkg/services/object/internal/client/error.go
Normal 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)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue