go-common/app/job/main/ugcpay/server/http/http.go

31 lines
489 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package http
import (
"go-common/app/job/main/ugcpay/conf"
"go-common/app/job/main/ugcpay/service"
"go-common/library/log"
bm "go-common/library/net/http/blademaster"
)
var (
srv *service.Service
)
// Init init
func Init(s *service.Service) {
srv = s
engine := bm.DefaultServer(conf.Conf.BM)
route(engine)
if err := engine.Start(); err != nil {
log.Error("bm Start error(%+v)", err)
panic(err)
}
}
func route(e *bm.Engine) {
e.Ping(ping)
}
func ping(c *bm.Context) {
}