add redis password

fix https://github.com/chrislusf/seaweedfs/issues/263
This commit is contained in:
chrislusf
2016-03-08 08:46:28 -08:00
parent f7f9129b05
commit 4c8367a8b3
4 changed files with 9 additions and 6 deletions

View File

@@ -28,7 +28,7 @@ func NewFilerServer(r *http.ServeMux, port int, master string, dir string, colle
replication string, redirectOnRead bool, disableDirListing bool,
secret string,
cassandra_server string, cassandra_keyspace string,
redis_server string, redis_database int,
redis_server string, redis_password string, redis_database int,
) (fs *FilerServer, err error) {
fs = &FilerServer{
master: master,
@@ -46,7 +46,7 @@ func NewFilerServer(r *http.ServeMux, port int, master string, dir string, colle
}
fs.filer = flat_namespace.NewFlatNamespaceFiler(master, cassandra_store)
} else if redis_server != "" {
redis_store := redis_store.NewRedisStore(redis_server, redis_database)
redis_store := redis_store.NewRedisStore(redis_server, redis_password, redis_database)
fs.filer = flat_namespace.NewFlatNamespaceFiler(master, redis_store)
} else {
if fs.filer, err = embedded_filer.NewFilerEmbedded(master, dir); err != nil {