feat 自定义拦截器

This commit is contained in:
2026-01-16 23:51:47 +08:00
parent e4e08b7366
commit 074a6aa5b3
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.RegisterSceneServer(serve, s)
}