1 Star 0 Fork 51

ryvius_key / srpc

forked from 搜狗开源 / srpc 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
tutorial-01-idl.md 798 Bytes
一键复制 编辑 原始数据 按行查看 历史
liyingxin 提交于 2021-06-20 22:25 . update docs

中文版

RPC IDL

  • Interface Description Languaue file
  • Backward and forward compatibility
  • Protobuf/Thrift

Sample

You can follow the detailed example below:

  • Take pb as an example. First, define an example.proto file with the ServiceName as Example.
  • The name of the rpc interface is Echo, with the input parameter as EchoRequest, and the output parameter as EchoResponse.
  • EchoRequest consists of two strings: message and name.
  • EchoResponse consists of one 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/ryvius_key/srpc.git
git@gitee.com:ryvius_key/srpc.git
ryvius_key
srpc
srpc
master

搜索帮助