mirror of
https://github.com/duanhf2012/origin.git
synced 2026-03-16 05:48:59 +08:00
调整orgin结点名称与增加全局模块
This commit is contained in:
25
originnode/global.go
Normal file
25
originnode/global.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user