diff --git a/go.mod b/go.mod index d9a58fd..4fef7d1 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-20260116143417-d944729ad0e5 + git.hlsq.asia/mmorpg/service-common v0.0.0-20260116155014-3de703eb83c5 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 71ec13f..c59ef9d 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-20260116143417-d944729ad0e5 h1:gkPNZ/OiXQhtiqRMdLrL5Zw580zgb9082jkZQqP71Fk= -git.hlsq.asia/mmorpg/service-common v0.0.0-20260116143417-d944729ad0e5/go.mod h1:Dazg+4woCv9Jk7jgT2qUSGWhZOXx/0WYfJO+FCUDyhw= +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= 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= diff --git a/internal/grpc_server/server_init.go b/internal/grpc_server/server_init.go index 477eab7..8a61802 100644 --- a/internal/grpc_server/server_init.go +++ b/internal/grpc_server/server_init.go @@ -20,11 +20,16 @@ func NewServer(ttl int64) *Server { EtcdTTL: ttl, }, } + s.Base.OnCustomGrpcServerOption = s.OnCustomGrpcServerOption s.Base.OnInit = s.OnInit s.Base.OnClose = s.OnClose return s } +func (s *Server) OnCustomGrpcServerOption() []grpc.ServerOption { + return nil +} + func (s *Server) OnInit(serve *grpc.Server) { grpc_pb.RegisterSceneServer(serve, s) }