mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
go fmt
This commit is contained in:
parent
6887e55f6a
commit
af4b9c3aee
|
@ -32,9 +32,9 @@ func NewRaftServer(r *mux.Router, version string, peers []string, httpAddr strin
|
|||
router: r,
|
||||
}
|
||||
|
||||
if glog.V(4) {
|
||||
raft.SetLogLevel(2)
|
||||
}
|
||||
if glog.V(4) {
|
||||
raft.SetLogLevel(2)
|
||||
}
|
||||
|
||||
var err error
|
||||
transporter := raft.NewHTTPTransporter("/cluster")
|
||||
|
@ -49,7 +49,7 @@ func NewRaftServer(r *mux.Router, version string, peers []string, httpAddr strin
|
|||
s.raftServer.Start()
|
||||
|
||||
s.router.HandleFunc("/cluster/join", s.joinHandler).Methods("POST")
|
||||
s.router.HandleFunc("/cluster/status", s.statusHandler).Methods("GET")
|
||||
s.router.HandleFunc("/cluster/status", s.statusHandler).Methods("GET")
|
||||
|
||||
// Join to leader if specified.
|
||||
if len(s.peers) > 0 {
|
||||
|
|
|
@ -46,8 +46,8 @@ func (s *RaftServer) redirectToLeader(w http.ResponseWriter, req *http.Request)
|
|||
}
|
||||
|
||||
func (s *RaftServer) statusHandler(w http.ResponseWriter, r *http.Request) {
|
||||
m := make(map[string]interface{})
|
||||
m["Leader"] = s.Leader()
|
||||
m["Members"] = s.Members()
|
||||
writeJsonQuiet(w, r, m)
|
||||
m := make(map[string]interface{})
|
||||
m["Leader"] = s.Leader()
|
||||
m["Members"] = s.Members()
|
||||
writeJsonQuiet(w, r, m)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue