feat app 模块

This commit is contained in:
2026-01-16 22:07:07 +08:00
parent e482833f72
commit 167c5dae35
6 changed files with 159 additions and 136 deletions

View File

@@ -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-qgdzs/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
}