1
This commit is contained in:
parent
910e7417d6
commit
354c5e7166
@ -27,8 +27,8 @@ func (this *app) Run(initCb func(), unInitCb func()) {
|
|||||||
func (this *app) Init() {
|
func (this *app) Init() {
|
||||||
f5.LoadMetaTable(mt.Table)
|
f5.LoadMetaTable(mt.Table)
|
||||||
this.registerDataSources()
|
this.registerDataSources()
|
||||||
this.ginEngine = gin.New()
|
//this.ginEngine = gin.New()
|
||||||
this.ginEngine.Use(gin.Recovery())
|
//this.ginEngine.Use(gin.Recovery())
|
||||||
this.initCb()
|
this.initCb()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ import (
|
|||||||
|
|
||||||
var modules [constant.MAX_MODULE_IDX]q5.Module
|
var modules [constant.MAX_MODULE_IDX]q5.Module
|
||||||
var initOrders = []int32 {
|
var initOrders = []int32 {
|
||||||
|
constant.ROUTER_MODULE_IDX,
|
||||||
}
|
}
|
||||||
|
|
||||||
var app common.App
|
var app common.App
|
||||||
@ -25,6 +26,9 @@ func RegModule(idx int32, m q5.Module) {
|
|||||||
{
|
{
|
||||||
app = m.(common.App)
|
app = m.(common.App)
|
||||||
}
|
}
|
||||||
|
case constant.ROUTER_MODULE_IDX:
|
||||||
|
{
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
panic("unknow module")
|
panic("unknow module")
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
package router
|
package router
|
||||||
|
|
||||||
|
import (
|
||||||
|
"f5"
|
||||||
|
)
|
||||||
|
|
||||||
type routerMgr struct {
|
type routerMgr struct {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (this* routerMgr) Init() {
|
func (this* routerMgr) Init() {
|
||||||
|
f5.GetSysLog().Info("routerMgr.init")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this* routerMgr) UnInit() {
|
func (this* routerMgr) UnInit() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user