mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-19 12:34:29 +02:00
add stats raft handler
This commit is contained in:
1 parent
1a1e5778c3
commit
622297f1a7
2 files changed
+9
-1
No files matched your search
@@ -25,3 +25,11 @@ func (s *RaftServer) StatusHandler(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
writeJsonQuiet(w, r, http.StatusOK, ret)
|
||||
}
|
||||
|
||||
func (s *RaftServer) StatsRaftHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if s.RaftHashicorp == nil {
|
||||
writeJsonQuiet(w, r, http.StatusNotFound, nil)
|
||||
return
|
||||
}
|
||||
writeJsonQuiet(w, r, http.StatusOK, s.RaftHashicorp.Stats())
|
||||
}
|
||||
Reference in new issue
Block a user