|
|
@ -40,12 +40,9 @@ func main() {
|
|
|
|
s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
|
|
|
|
s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
|
|
|
|
{{.pkg}}.Register{{.service}}Server(grpcServer, srv)
|
|
|
|
{{.pkg}}.Register{{.service}}Server(grpcServer, srv)
|
|
|
|
|
|
|
|
|
|
|
|
switch c.Mode {
|
|
|
|
if c.Mode == service.DevMode || c.Mode == service.TestMode {
|
|
|
|
case service.DevMode,service.TestMode:
|
|
|
|
|
|
|
|
reflection.Register(grpcServer)
|
|
|
|
reflection.Register(grpcServer)
|
|
|
|
default:
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
defer s.Stop()
|
|
|
|
defer s.Stop()
|
|
|
|
|
|
|
|
|
|
|
|