merge improve-1.6.9 about conf polish

v4
vinllen 5 years ago
commit 4a49fb5676
  1. 8
      conf/redis-shake.conf
  2. 5
      src/redis-shake/common/configure.go

@ -35,12 +35,12 @@ source.type = standalone
# ip:port
# the source address can be the following:
# 1. single db address. for "standalone" type.
# 2. ${sentinel_master_name}:${master or slave}@sentinel single/cluster address, e.g., mymaster:master@127.0.0.1:26379;127.0.0.1:26380. for "sentinel" type.
# 2. ${sentinel_master_name}:${master or slave}@sentinel single/cluster address, e.g., mymaster:master@127.0.0.1:26379;127.0.0.1:26380, or @127.0.0.1:26379;127.0.0.1:26380. for "sentinel" type.
# 3. cluster that has several db nodes split by semicolon(;). for "cluster" type. e.g., 10.1.1.1:20331;10.1.1.2:20441.
# 4. proxy address(used in "rump" mode only). for "proxy" type.
# 源redis地址。对于sentinel模式,输入格式为"master名字:拉取角色为master或者slave@sentinel的地址"
source.address = 127.0.0.1:20441
# password.
# password of db/proxy. even if type is sentinel.
source.password_raw = 123456
# auth type, don't modify it
source.auth_type = auth
@ -59,11 +59,11 @@ target.type = standalone
# ip:port
# the target address can be the following:
# 1. single db address. for "standalone" type.
# 2. sentinel_master_name@sentinel single/cluster address, e.g., mymaster@127.0.0.1:26379;127.0.0.1:26380. for "sentinel" type.
# 2. ${sentinel_master_name}:${master or slave}@sentinel single/cluster address, e.g., mymaster:master@127.0.0.1:26379;127.0.0.1:26380, or @127.0.0.1:26379;127.0.0.1:26380. for "sentinel" type.
# 3. cluster that has several db nodes split by semicolon(;). for "cluster" type.
# 4. proxy address(used in "rump" mode only). for "proxy" type.
target.address = 127.0.0.1:20551
# password.
# password of db/proxy. even if type is sentinel.
target.password_raw =
# auth type, don't modify it
target.auth_type = auth

@ -57,8 +57,9 @@ func parseAddress(tp, address, redisType string, isSource bool) error {
case conf.RedisTypeSentinel:
arr := strings.Split(address, AddressSplitter)
if len(arr) != 2 {
return fmt.Errorf("redis type[%v] address[%v] length[%v] != 2",
conf.RedisTypeStandalone, address, len(arr))
return fmt.Errorf("redis type[%v] address[%v] must begin with or has '%v': e.g., \"master@ip1:port1;ip2:port2\", " +
"\"@ip1:port1,ip2:port2\"",
conf.RedisTypeSentinel, address, AddressSplitter)
}
var masterName string

Loading…
Cancel
Save