1 Star 0 Fork 2

who7708/etcd

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
server.go 364 Bytes
一键复制 编辑 原始数据 按行查看 历史
XiangLi 提交于 2015-08-03 09:06 . Godeps: add probing dependency
package probing
import (
"encoding/json"
"net/http"
"time"
)
func NewHandler() http.Handler {
return &httpHealth{}
}
type httpHealth struct {
}
type Health struct {
OK bool
Now time.Time
}
func (h *httpHealth) ServeHTTP(w http.ResponseWriter, r *http.Request) {
health := Health{OK: true, Now: time.Now()}
e := json.NewEncoder(w)
e.Encode(health)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/who7708/etcd.git
git@gitee.com:who7708/etcd.git
who7708
etcd
etcd
v2.3.8

搜索帮助