feat app 模块
This commit is contained in:
11
app/base.go
11
app/base.go
@@ -2,6 +2,7 @@ package app
|
||||
|
||||
import (
|
||||
"git.hlsq.asia/mmorpg/service-common/log"
|
||||
"git.hlsq.asia/mmorpg/service-common/module"
|
||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
||||
"git.hlsq.asia/mmorpg/service-user/config"
|
||||
"math/rand"
|
||||
@@ -11,7 +12,7 @@ import (
|
||||
type ModuleBase struct {
|
||||
}
|
||||
|
||||
func (p *ModuleBase) init() error {
|
||||
func (m *ModuleBase) Init() error {
|
||||
// 配置
|
||||
if err := config.LoadConfig(); err != nil {
|
||||
return err
|
||||
@@ -24,10 +25,14 @@ func (p *ModuleBase) init() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *ModuleBase) start() error {
|
||||
func (m *ModuleBase) Start() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *ModuleBase) stop() error {
|
||||
func (m *ModuleBase) Stop() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ModuleBase) Bind(_ ...any) module.Module {
|
||||
return m
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user