proto/Base.proto

28 lines
745 B
Protocol Buffer
Raw Normal View History

2022-06-20 08:30:45 +00:00
syntax = "proto3";
import "google/protobuf/any.proto";
option java_multiple_files = false; //不要拆分成多个文件
option java_package = "com.yuandian.dataflow.proto";
option go_package = "../grpc-gen;grpcgen";
package dataflow;
2022-06-29 01:45:17 +00:00
2022-06-20 08:30:45 +00:00
message Response {
2022-06-29 01:45:17 +00:00
int32 code = 1; // 返回的状态码
string message = 2; // 消息
repeated google.protobuf.Any packets = 4; // 批量数据包
2022-06-20 08:30:45 +00:00
}
message Request {
int32 type = 1; // 请求类型. 默认 为 1. 暂无意义
string version = 2; // 请求版本. 区分版本. 非必要时不使用
2022-06-29 01:45:17 +00:00
repeated google.protobuf.Any param = 3; // 请求的可变参数. 暂不使用
2022-06-20 08:30:45 +00:00
}
service CollectPacketsServer {
rpc GetPackets (Request) returns (stream Response);
}