Code Review
/
ric-plt
/
sdlgo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Go version changed
[ric-plt/sdlgo.git]
/
internal
/
sdlgoredis
/
dbstate.go
diff --git
a/internal/sdlgoredis/dbstate.go
b/internal/sdlgoredis/dbstate.go
index
e3b9d0a
..
6bbe40f
100644
(file)
--- a/
internal/sdlgoredis/dbstate.go
+++ b/
internal/sdlgoredis/dbstate.go
@@
-29,6
+29,9
@@
import (
//DbState struct is a holder for DB state information, which is received from
//sdlgoredis sentinel 'Master' and 'Slaves' calls output.
type DbState struct {
//DbState struct is a holder for DB state information, which is received from
//sdlgoredis sentinel 'Master' and 'Slaves' calls output.
type DbState struct {
+ Err error
+ ConfigNodeCnt int
+
PrimaryDbState PrimaryDbState
ReplicasDbState *ReplicasDbState
SentinelsDbState *SentinelsDbState
PrimaryDbState PrimaryDbState
ReplicasDbState *ReplicasDbState
SentinelsDbState *SentinelsDbState
@@
-90,6
+93,10
@@
type SentinelDbStateFields struct {
}
func (dbst *DbState) IsOnline() error {
}
func (dbst *DbState) IsOnline() error {
+ if err := dbst.Err; err != nil {
+ return err
+ }
+
if err := dbst.PrimaryDbState.IsOnline(); err != nil {
return err
}
if err := dbst.PrimaryDbState.IsOnline(); err != nil {
return err
}