mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
rename variables
This commit is contained in:
parent
021ef0d14b
commit
7ecc0f4b11
|
@ -83,8 +83,8 @@ func runFiler(cmd *Command, args []string) bool {
|
||||||
glog.Fatalf("Check Meta Folder (-dir) Writable %s : %s", *f.dir, err)
|
glog.Fatalf("Check Meta Folder (-dir) Writable %s : %s", *f.dir, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
r := http.NewServeMux()
|
defaultMux := http.NewServeMux()
|
||||||
_, nfs_err := weed_server.NewFilerServer(r, *f.ip, *f.port, *f.master, *f.dir, *f.collection,
|
_, nfs_err := weed_server.NewFilerServer(defaultMux, *f.ip, *f.port, *f.master, *f.dir, *f.collection,
|
||||||
*f.defaultReplicaPlacement, *f.redirectOnRead, *f.disableDirListing,
|
*f.defaultReplicaPlacement, *f.redirectOnRead, *f.disableDirListing,
|
||||||
*f.confFile,
|
*f.confFile,
|
||||||
*f.maxMB,
|
*f.maxMB,
|
||||||
|
@ -103,7 +103,7 @@ func runFiler(cmd *Command, args []string) bool {
|
||||||
if e != nil {
|
if e != nil {
|
||||||
glog.Fatalf("Filer listener error: %v", e)
|
glog.Fatalf("Filer listener error: %v", e)
|
||||||
}
|
}
|
||||||
if e := http.Serve(filerListener, r); e != nil {
|
if e := http.Serve(filerListener, defaultMux); e != nil {
|
||||||
glog.Fatalf("Filer Fail to serve: %v", e)
|
glog.Fatalf("Filer Fail to serve: %v", e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ type FilerServer struct {
|
||||||
masterNodes *storage.MasterNodes
|
masterNodes *storage.MasterNodes
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewFilerServer(r *http.ServeMux, ip string, port int, master string, dir string, collection string,
|
func NewFilerServer(defaultMux *http.ServeMux, ip string, port int, master string, dir string, collection string,
|
||||||
replication string, redirectOnRead bool, disableDirListing bool,
|
replication string, redirectOnRead bool, disableDirListing bool,
|
||||||
confFile string,
|
confFile string,
|
||||||
maxMB int,
|
maxMB int,
|
||||||
|
@ -105,12 +105,12 @@ func NewFilerServer(r *http.ServeMux, ip string, port int, master string, dir st
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
r.HandleFunc("/admin/mv", fs.moveHandler)
|
defaultMux.HandleFunc("/admin/mv", fs.moveHandler)
|
||||||
r.HandleFunc("/admin/register", fs.registerHandler)
|
defaultMux.HandleFunc("/admin/register", fs.registerHandler)
|
||||||
r.HandleFunc("/__api__", fs.apiHandler)
|
defaultMux.HandleFunc("/__api__", fs.apiHandler)
|
||||||
}
|
}
|
||||||
|
|
||||||
r.HandleFunc("/", fs.filerHandler)
|
defaultMux.HandleFunc("/", fs.filerHandler)
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
connected := true
|
connected := true
|
||||||
|
|
Loading…
Reference in a new issue