完善服务器

This commit is contained in:
2025-07-01 00:08:27 +08:00
parent b45eb83fe4
commit 7c2c32a31a
37 changed files with 1307 additions and 160 deletions

View File

@@ -8,14 +8,14 @@ import (
)
type Server struct {
grpc_pb.UnimplementedGatewayServer
grpc_pb.UnimplementedSceneServer
service.Base
}
func NewServer(ttl int64) *Server {
s := &Server{
Base: service.Base{
Target: common.KeyDiscoverGateway,
Target: common.KeyDiscoverScene,
EtcdTTL: ttl,
},
}
@@ -25,7 +25,7 @@ func NewServer(ttl int64) *Server {
}
func (s *Server) OnInit(serve *grpc.Server) {
grpc_pb.RegisterGatewayServer(serve, s)
grpc_pb.RegisterSceneServer(serve, s)
}
func (s *Server) OnClose() {