feat 自定义拦截器

This commit is contained in:
2026-01-16 23:51:46 +08:00
parent c5d84bad0e
commit 1f3bee0db7
3 changed files with 8 additions and 3 deletions

View File

@@ -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.RegisterQgdzsServer(serve, s)
}