gRPC
Fighting_mjtao
这个作者很懒,什么都没留下…
展开
-
gRPC四种服务类型
Unary RPC:这就是一般的rpc调用,一个请求对象对应一个返回对象@Override public void getFeature(Point request, StreamObserver<Feature> responseObserver) { responseObserver.onNext(checkFeature(request)); ...原创 2019-06-20 16:08:06 · 1353 阅读 · 0 评论 -
gRPC-Server&Client
使用官方的RouteGuideService例子,RouteGuideService类需要extends from .proto文件生成的RouteGuideGrpc.RouteGuideImplBase抽象类private static class RouteGuideService extends RouteGuideGrpc.RouteGuideImplBase {...}S...原创 2019-06-20 20:33:48 · 451 阅读 · 0 评论 -
Protobuf3语法
官网原文:https://developers.google.cn/protocol-buffers/docs/proto3syntax = "proto3";// 文件首个非空、非注释的行必须表明protobuf的版本,默认是proto2//importimport "google/protobuf/wrappers.proto";import "src/main/proto/o...原创 2019-06-21 15:59:26 · 1697 阅读 · 0 评论 -
gRPC的newStub与newBlockingStub的区别
/** * Creates a new async stub that supports all call types for the service */ public static GoodsServiceStub newStub(io.grpc.Channel channel) { return new GoodsServiceStub(channel); }...原创 2019-06-24 11:11:25 · 5586 阅读 · 0 评论