You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

30 lines
581 B

package http
import (
"net/http"
"go-common/app/admin/main/macross/conf"
"go-common/library/log"
bm "go-common/library/net/http/blademaster"
)
// ping check server ok.
func ping(c *bm.Context) {
if err := svr.Ping(c); err != nil {
log.Error("resource service ping error(%v)", err)
c.AbortWithStatus(http.StatusServiceUnavailable)
}
}
// version check server version.
func version(c *bm.Context) {
data := map[string]interface{}{
"version": conf.Conf.Version,
}
c.JSONMap(data, nil)
}
// register for discovery
func register(c *bm.Context) {
c.JSON(nil, nil)
}