28 lines
654 B
Protocol Buffer
28 lines
654 B
Protocol Buffer
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;
|
|
|
|
message Response {
|
|
int32 code = 1;
|
|
string message = 2;
|
|
repeated google.protobuf.Any packets = 4;
|
|
}
|
|
|
|
message Request {
|
|
int32 type = 1; // 请求类型. 默认 为 1. 暂无意义
|
|
string version = 2; // 请求版本. 区分版本. 非必要时不使用
|
|
repeated google.protobuf.Any param = 3;
|
|
}
|
|
|
|
service CollectPacketsServer {
|
|
rpc GetPackets (Request) returns (stream Response);
|
|
}
|