【问题标题】:gRPC NodeJS how to get list of all methodsgRPC NodeJS如何获取所有方法的列表
【发布时间】:2017-10-26 12:31:19
【问题描述】:

我想获取 gRPC 中服务器的所有方法(gPRC 方法名称)的列表。我没有在 NodeJS gRPC 引用中找到方法或属性来获取 gRPC 方法列表 - https://grpc.io/grpc/node/grpc.Server.html。我怎样才能做到这一点?谢谢)

【问题讨论】:

    标签: javascript node.js grpc


    【解决方案1】:
    const Service = grpc.load(protoPath).examplePackage.exampleService;
    // your methods:
    const methods = Object.keys(Service.prototype);
    

    我从here得到了解决方案

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多