go-common/app/interface/main/app-channel/http/local.go

18 lines
330 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package http
import (
"net/http"
"go-common/library/log"
bm "go-common/library/net/http/blademaster"
)
// ping check server ok.
func ping(c *bm.Context) {
var err error
if err = channelSvc.Ping(c); err != nil {
log.Error("app-channel service ping error(%v)", err)
c.AbortWithStatus(http.StatusServiceUnavailable)
}
}