Browse Source

filer: redis cluster add option for password

fix https://github.com/chrislusf/seaweedfs/issues/971
pull/991/head
Chris Lu 6 years ago
parent
commit
54b835e1ae
  1. 1
      weed/command/scaffold.go
  2. 6
      weed/filer2/redis/redis_cluster_store.go

1
weed/command/scaffold.go

@ -141,6 +141,7 @@ addresses = [
"localhost:30005",
"localhost:30006",
]
password = ""
`

6
weed/filer2/redis/redis_cluster_store.go

@ -21,12 +21,14 @@ func (store *RedisClusterStore) GetName() string {
func (store *RedisClusterStore) Initialize(configuration util.Configuration) (err error) {
return store.initialize(
configuration.GetStringSlice("addresses"),
configuration.GetString("password"),
)
}
func (store *RedisClusterStore) initialize(addresses []string) (err error) {
func (store *RedisClusterStore) initialize(addresses []string, password string) (err error) {
store.Client = redis.NewClusterClient(&redis.ClusterOptions{
Addrs: addresses,
Addrs: addresses,
Password: password,
})
return
}
Loading…
Cancel
Save