//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
}
func (dbst *DbState) IsOnline() error {
+ if err := dbst.Err; err != nil {
+ return err
+ }
+
if err := dbst.PrimaryDbState.IsOnline(); err != nil {
return err
}