2022-12-19 14:47:28 +00:00
|
|
|
package internal
|
|
|
|
|
2023-03-07 13:38:26 +00:00
|
|
|
import clientcore "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/client"
|
2022-12-19 14:47:28 +00:00
|
|
|
|
|
|
|
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)
|
|
|
|
}
|
|
|
|
}
|