|
|
@ -108,7 +108,7 @@ func parseAddress(tp, address, redisType string, isSource bool) error { |
|
|
|
if isSource && arr[0] != conf.StandAloneRoleSlave && arr[0] != conf.StandAloneRoleMaster { |
|
|
|
if isSource && arr[0] != conf.StandAloneRoleSlave && arr[0] != conf.StandAloneRoleMaster { |
|
|
|
return fmt.Errorf("source redis role must be master or slave, when enable automatic discovery with '@'") |
|
|
|
return fmt.Errorf("source redis role must be master or slave, when enable automatic discovery with '@'") |
|
|
|
} |
|
|
|
} |
|
|
|
if !isSource && arr[0] != "master" { |
|
|
|
if !isSource && arr[0] != "master" && arr[0] != "" { |
|
|
|
return fmt.Errorf("target redis role must be master, when enable automatic discovery with '@'") |
|
|
|
return fmt.Errorf("target redis role must be master, when enable automatic discovery with '@'") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|