From ee5a840048443aa5f261ade6ded7238e58dbecee Mon Sep 17 00:00:00 2001 From: "DESKTOP-V763RJ7\\Administrator" <835606593@qq.com> Date: Sun, 18 Jan 2026 00:08:56 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E6=9C=8D=E5=8A=A1=E5=8F=91=E7=8E=B0?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/app.go | 4 +--- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/app.go b/app/app.go index 18b176d..d517bb5 100644 --- a/app/app.go +++ b/app/app.go @@ -2,7 +2,6 @@ package app import ( "fmt" - "git.hlsq.asia/mmorpg/service-common/discover" "git.hlsq.asia/mmorpg/service-common/discover/common" "git.hlsq.asia/mmorpg/service-common/log" "git.hlsq.asia/mmorpg/service-common/module" @@ -24,6 +23,7 @@ func (p *Program) Init(_ svc.Environment) error { p.moduleList = append(p.moduleList, &ModuleGrpcServer{}) p.moduleList = append(p.moduleList, (&module.Prometheus{}).Bind(config.Get().Metric)) p.moduleList = append(p.moduleList, (&module.Tracer{}).Bind(config.Get().Metric, common.KeyDiscoverServiceNameScene)) + p.moduleList = append(p.moduleList, &module.Discover{}) for i, m := range p.moduleList { if i == 0 { @@ -43,14 +43,12 @@ func (p *Program) Start() error { return err } } - discover.Listen() log.Infof(fmt.Sprintf("%v Start successful...", config.Get().App.Name)) return nil } func (p *Program) Stop() error { - discover.Close() for i := len(p.moduleList) - 1; i >= 0; i-- { m := p.moduleList[i] if err := m.Stop(); err != nil { diff --git a/go.mod b/go.mod index 4fef7d1..325f086 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module git.hlsq.asia/mmorpg/service-scene go 1.24.0 require ( - git.hlsq.asia/mmorpg/service-common v0.0.0-20260116155014-3de703eb83c5 + git.hlsq.asia/mmorpg/service-common v0.0.0-20260117160658-22d48542a852 github.com/judwhite/go-svc v1.2.1 go.uber.org/zap v1.27.0 google.golang.org/grpc v1.77.0 diff --git a/go.sum b/go.sum index c59ef9d..8cb5a49 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= -git.hlsq.asia/mmorpg/service-common v0.0.0-20260116155014-3de703eb83c5 h1:b7pTgEyYUKpHtAAt4ea/3EYfX0Y0lYwhjrgf3kTyn0w= -git.hlsq.asia/mmorpg/service-common v0.0.0-20260116155014-3de703eb83c5/go.mod h1:Dazg+4woCv9Jk7jgT2qUSGWhZOXx/0WYfJO+FCUDyhw= +git.hlsq.asia/mmorpg/service-common v0.0.0-20260117160658-22d48542a852 h1:ehZ54MgGL3CO7KKDPxybFabIXxiQud1TGMcKjrSTcnw= +git.hlsq.asia/mmorpg/service-common v0.0.0-20260117160658-22d48542a852/go.mod h1:Dazg+4woCv9Jk7jgT2qUSGWhZOXx/0WYfJO+FCUDyhw= github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=