Documentation ¶
Index ¶
- Constants
- Variables
- func RegisteModule(m Module, tickInterval time.Duration, priority int)
- func RegistePreloadModule(m PreloadModule, priority int)
- func Start() *utils.Waitor
- func Stop()
- func UnregisteModule(m Module)
- type Configuration
- type Module
- type ModuleEntity
- type ModuleMgr
- func (this *ModuleMgr) Close()
- func (this *ModuleMgr) GetCurrTimeNano() int64
- func (this *ModuleMgr) GetCurrTimeSec() int64
- func (this *ModuleMgr) GetModuleByName(name string) Module
- func (this *ModuleMgr) OnStart()
- func (this *ModuleMgr) OnStop()
- func (this *ModuleMgr) OnTick()
- func (this *ModuleMgr) RegisteModule(m Module, tickInterval time.Duration, priority int)
- func (this *ModuleMgr) RegistePreloadModule(m PreloadModule, priority int)
- func (this *ModuleMgr) Start() *utils.Waitor
- func (this *ModuleMgr) UnregisteModule(m Module)
- func (this *ModuleMgr) UnregistePreloadModule(m PreloadModule)
- type PreloadModule
- type PreloadModuleEntity
Constants ¶
View Source
const ( ModuleName_Net string = "net-module" ModuleName_Transact = "dtc-module" )
View Source
const ( ///module state ModuleStateInvalid int = iota ModuleStateInit ModuleStateRun ModuleStateShutdown ModuleStateWaitShutdown ModuleStateFini ///other ModuleMaxCount = 1024 )
Variables ¶
View Source
var (
AppModule = newModuleMgr()
)
View Source
var Config = Configuration{}
Functions ¶
func RegistePreloadModule ¶
func RegistePreloadModule(m PreloadModule, priority int)
func UnregisteModule ¶
func UnregisteModule(m Module)
Types ¶
type Configuration ¶
func (*Configuration) Close ¶
func (c *Configuration) Close() error
func (*Configuration) Init ¶
func (c *Configuration) Init() error
func (*Configuration) Name ¶
func (c *Configuration) Name() string
type ModuleEntity ¶
type ModuleEntity struct {
// contains filtered or unexported fields
}
type ModuleMgr ¶
func (*ModuleMgr) GetCurrTimeNano ¶
func (*ModuleMgr) GetCurrTimeSec ¶
func (*ModuleMgr) GetModuleByName ¶
func (*ModuleMgr) RegisteModule ¶
func (*ModuleMgr) RegistePreloadModule ¶
func (this *ModuleMgr) RegistePreloadModule(m PreloadModule, priority int)
func (*ModuleMgr) UnregisteModule ¶
func (*ModuleMgr) UnregistePreloadModule ¶
func (this *ModuleMgr) UnregistePreloadModule(m PreloadModule)
type PreloadModule ¶
type PreloadModule interface {
Start()
}
type PreloadModuleEntity ¶
type PreloadModuleEntity struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.