Ai
1 Star 1 Fork 0

medcl/elasticsearch-proxy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
stats_handler.go 590 Bytes
一键复制 编辑 原始数据 按行查看 历史
medcl 提交于 2018-04-12 00:09 +08:00 . logging error request
package api
import (
"github.com/infinitbyte/framework/core/api/router"
"github.com/infinitbyte/framework/core/stats"
"net/http"
)
func getMapValue(mapData map[string]int, key string, defaultValue int32) int {
data := mapData[key]
return data
}
// StatsAction return stats information
func (handler *API) StatsAction(w http.ResponseWriter, req *http.Request, _ httprouter.Params) {
m := stats.StatsAll()
handler.WriteJSONHeader(w)
handler.Write(w, *m)
}
func (handler *API) FaviconAction(w http.ResponseWriter, req *http.Request, _ httprouter.Params) {
w.Write([]byte("."))
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/medcl/elasticsearch-proxy.git
git@gitee.com:medcl/elasticsearch-proxy.git
medcl
elasticsearch-proxy
elasticsearch-proxy
master

搜索帮助