feat 历史记录

This commit is contained in:
2026-01-14 18:15:40 +08:00
parent 90dd60e6c6
commit 8b26534a15
11 changed files with 520 additions and 186 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.UnimplementedQgdzsServer
service.Base
}
func NewServer(ttl int64) *Server {
s := &Server{
Base: service.Base{
Target: common.KeyDiscoverQgdzs,
EtcdTTL: ttl,
},
}
s.Base.OnInit = s.OnInit
s.Base.OnClose = s.OnClose
return s
}
func (s *Server) OnInit(serve *grpc.Server) {
grpc_pb.RegisterQgdzsServer(serve, s)
}
func (s *Server) OnClose() {
}