2
0

remove HasPreferStandbyTargetSessionAttr, rename error to indicate server is not standby

This commit is contained in:
sergey.bashilov
2022-06-24 14:02:59 +03:00
committed by Jack Christensen
parent 1b6543f29c
commit 618a12a094
4 changed files with 15 additions and 20 deletions
+4 -4
View File
@@ -220,19 +220,19 @@ func redactURL(u *url.URL) string {
return u.String()
}
type preferStandbyNotFoundError struct {
type NotStandbyError struct {
err error
safeToRetry bool
}
func (e *preferStandbyNotFoundError) Error() string {
func (e *NotStandbyError) Error() string {
return fmt.Sprintf("standby server not found: %s", e.err.Error())
}
func (e *preferStandbyNotFoundError) SafeToRetry() bool {
func (e *NotStandbyError) SafeToRetry() bool {
return e.safeToRetry
}
func (e *preferStandbyNotFoundError) Unwrap() error {
func (e *NotStandbyError) Unwrap() error {
return e.err
}