123456789101112131415161718 |
- syntax = "proto3";//声明proto的版本 只能 是3,才支持 grpc
- //声明 包名
- package proto;
- //服务管理
- service DemoService {
- //rpc
- rpc Say(DemoReq)returns(DemoRep){}
- }
- //服务参数
- message DemoReq{
- string name = 1;
- }
- //标准字符串返回结果
- message DemoRep{
- string data = 1;
- }
|