feat kafka 改版 2

This commit is contained in:
2026-01-30 11:02:53 +08:00
parent defe0b8fff
commit 39fa373c01
22 changed files with 1297 additions and 236 deletions

View File

@@ -5,12 +5,15 @@ 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"
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/query"
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/repository"
"google.golang.org/grpc"
)
type Server struct {
grpc_pb.UnimplementedQgdzsServer
service.Base
query *query.Query
}
func NewServer(cfg *config.GrpcConfig) *Server {
@@ -33,6 +36,7 @@ func (s *Server) OnCustomGrpcServerOption() []grpc.ServerOption {
func (s *Server) OnInit(serve *grpc.Server) {
grpc_pb.RegisterQgdzsServer(serve, s)
s.query = repository.Query()
}
func (s *Server) OnClose() {