21 Star 112 Fork 50

搜狗开源 / srpc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
docs-01-idl.md 712 Bytes
一键复制 编辑 原始数据 按行查看 历史

English version

01 - RPC IDL

  • 描述文件
  • 前后兼容
  • Protobuf/Thrift

示例

下面我们通过一个具体例子来呈现

  • 我们拿pb举例,定义一个ServiceName为Exampleexample.proto文件
  • rpc接口名为Echo,输入参数为EchoRequest,输出参数为EchoResponse
  • EchoRequest包括两个string:messagename
  • EchoResponse包括一个string:message
syntax="proto2";

message EchoRequest {
    optional string message = 1;
    optional string name = 2;
};

message EchoResponse {
    optional string message = 1;
};

service Example {
     rpc Echo(EchoRequest) returns (EchoResponse);
};
C++
1
https://gitee.com/sogou/srpc.git
git@gitee.com:sogou/srpc.git
sogou
srpc
srpc
master

搜索帮助