feat 历史记录

This commit is contained in:
2026-01-14 18:15:38 +08:00
parent 6bd120ef54
commit 30d2c589bf
6 changed files with 7 additions and 9 deletions

View File

@@ -0,0 +1,32 @@
package grpc_server
import (
"git.hlsq.asia/mmorpg/service-common/discover/common"
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
"google.golang.org/grpc"
)
type Server struct {
grpc_pb.UnimplementedSceneServer
service.Base
}
func NewServer(ttl int64) *Server {
s := &Server{
Base: service.Base{
Target: common.KeyDiscoverScene,
EtcdTTL: ttl,
},
}
s.Base.OnInit = s.OnInit
s.Base.OnClose = s.OnClose
return s
}
func (s *Server) OnInit(serve *grpc.Server) {
grpc_pb.RegisterSceneServer(serve, s)
}
func (s *Server) OnClose() {
}