调整orgin结点名称与增加全局模块

This commit is contained in:
boyce
2019-02-01 13:50:09 +08:00
parent 9420b685b2
commit 20bfffeb3e
4 changed files with 52 additions and 21 deletions

25
originnode/global.go Normal file
View File

@@ -0,0 +1,25 @@
package originnode
import (
_ "net/http/pprof"
"github.com/duanhf2012/origin/service"
)
type GlobalModule struct {
service.BaseModule
}
var g_module GlobalModule
func AddModule(module service.IModule) bool {
if module.GetModuleType() == 0 {
return false
}
return g_module.AddModule(module)
}
func GetModuleByType(moduleType uint32) service.IModule {
return g_module.GetModuleByType(moduleType)
}