feat 模块增加after start

This commit is contained in:
2026-01-20 12:11:28 +08:00
parent c293f9688a
commit 95ccbb0676
6 changed files with 21 additions and 30 deletions

View File

@@ -5,10 +5,12 @@ import (
"git.hlsq.asia/mmorpg/service-common/module"
"git.hlsq.asia/mmorpg/service-robot/config"
"git.hlsq.asia/mmorpg/service-robot/internal/ws"
"sync"
)
// ModuleWebsocket Websocket客户端模块
type ModuleWebsocket struct {
module.DefaultModule
manager *ws.Manager
}
@@ -26,15 +28,8 @@ func (m *ModuleWebsocket) Init() error {
return nil
}
func (m *ModuleWebsocket) Start() error {
func (m *ModuleWebsocket) Start(ready *sync.WaitGroup) error {
m.manager.Start()
ready.Done()
return nil
}
func (m *ModuleWebsocket) Stop() error {
return nil
}
func (m *ModuleWebsocket) Bind(_ ...any) module.Module {
return m
}