refactor: align with starter v1.5.3 and service v1.5.12

This commit is contained in:
AI Engineer 2026-06-08 00:20:15 +08:00
parent 25ea4be195
commit 4a80a26371
3 changed files with 7 additions and 3 deletions

BIN
gateway Executable file

Binary file not shown.

4
go.mod
View File

@ -7,8 +7,8 @@ require (
apigo.cc/go/config v1.5.1 apigo.cc/go/config v1.5.1
apigo.cc/go/log v1.5.5 apigo.cc/go/log v1.5.5
apigo.cc/go/redis v1.5.0 apigo.cc/go/redis v1.5.0
apigo.cc/go/service v1.5.11 apigo.cc/go/service v1.5.12
apigo.cc/go/starter v1.5.2 apigo.cc/go/starter v1.5.3
) )
require apigo.cc/go/jsmod v1.5.0 // indirect require apigo.cc/go/jsmod v1.5.0 // indirect

View File

@ -37,7 +37,11 @@ Matching Logic:
starter.Register("gateway-core", app, 100, 5*time.Second, 10*time.Second) starter.Register("gateway-core", app, 100, 5*time.Second, 10*time.Second)
// 4. 运行服务生命周期,响应 start/stop/reload 等命令 // 4. 运行服务生命周期,响应 start/stop/reload 等命令
starter.Run() if err := starter.Start(); err != nil {
log.DefaultLogger.Error("gateway start failed", "error", err)
return
}
starter.Wait()
log.DefaultLogger.Info("gateway process exited") log.DefaultLogger.Info("gateway process exited")
} }