local.go 328 B

1234567891011121314151617
  1. package http
  2. import (
  3. "net/http"
  4. log "go-common/library/log"
  5. bm "go-common/library/net/http/blademaster"
  6. )
  7. // ping check server ok.
  8. func ping(c *bm.Context) {
  9. var err error
  10. if err = pingSvc.Ping(c); err != nil {
  11. log.Error("app-wall service ping error(%v)", err)
  12. c.AbortWithStatus(http.StatusServiceUnavailable)
  13. }
  14. }