diff --git a/gateway b/gateway new file mode 100755 index 0000000..672d0fa Binary files /dev/null and b/gateway differ diff --git a/go.mod b/go.mod index 22decc6..bb8c4e7 100644 --- a/go.mod +++ b/go.mod @@ -7,8 +7,8 @@ require ( apigo.cc/go/config v1.5.1 apigo.cc/go/log v1.5.5 apigo.cc/go/redis v1.5.0 - apigo.cc/go/service v1.5.11 - apigo.cc/go/starter v1.5.2 + apigo.cc/go/service v1.5.12 + apigo.cc/go/starter v1.5.3 ) require apigo.cc/go/jsmod v1.5.0 // indirect diff --git a/main.go b/main.go index 73bcd05..eb18d04 100644 --- a/main.go +++ b/main.go @@ -37,7 +37,11 @@ Matching Logic: starter.Register("gateway-core", app, 100, 5*time.Second, 10*time.Second) // 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") }