ligb

Results 2 issues of ligb

现在只能按照class查找,可以改成按照类名查找。 因为我在尝试使用其他语言调用时,调用需要写全路径会比较麻烦 比如: ``` client.handle({ serialize: 3, request: JSON.stringify({ clazz: "com.kshb.test.common.service.Grpc2Service", method: "test", args: ["param 参数"] }).toBytes("utf-8") }, function(err, response) { console.log(response.response.toString("utf-8")); client.close(); }); ```

使用中发现需要配置每个grpc服务的名称、地址和端口。 所以增加了可以通过nginx做分发和负载均衡。 后续想使用nacos或zookeeper尝试做注册中心 1.可配置nginx-host参数,通过nginx做负载均衡和服务分发。设定此参数后,将不需要再设定RemoteServer,GrpcService也可以不用设置server(将通过包名区分服务)。发起请求时,通过自定义grpc-clazz和grpc-server为http2的headers参数,在nginx方做服务分发。需要nginx配置配合,具体配置请参考wiki文档:4.1-nginx分发与负载均衡 2.可配置duration参数(单位毫秒),指定超时时间(默认30秒) 参考文档:[4.1-nginx分发和负载均衡](https://github.com/ligb888/spring-boot-starter-grpc/wiki/4.1-nginx%E5%88%86%E5%8F%91%E4%B8%8E%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1) wiki md文件: [nodejs示例和nginx分发.wiki.zip](https://github.com/ChinaSilence/spring-boot-starter-grpc/files/5628349/nodejs.nginx.wiki.zip)