Show Kyoto Cabinet configuration with /debug
This commit is contained in:
parent
eb4e6e8772
commit
959ce30374
|
@ -29,9 +29,15 @@ func StatusHandler(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
func DebugHandler(w http.ResponseWriter, r *http.Request) {
|
||||
info := make(map[string]int)
|
||||
info := make(map[string]interface{})
|
||||
info["goroutines"] = runtime.NumGoroutine()
|
||||
|
||||
s, err := storage.Status()
|
||||
if err != nil {
|
||||
Error(err, "Failed to get Kyoto Cabinet status")
|
||||
}
|
||||
info["kyoto_cabinet"] = s
|
||||
|
||||
jsn, _ := json.Marshal(info)
|
||||
w.Write(jsn)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue