TODO: 测试grpc c++互相调整.
This commit is contained in:
168
src/main/proto/ApmBaseDataFlow.proto
Normal file
168
src/main/proto/ApmBaseDataFlow.proto
Normal file
@@ -0,0 +1,168 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package com.yuandian.dataflow.proto;
|
||||
|
||||
message ApmBaseDataFlow {
|
||||
|
||||
int32 tableID = 1;
|
||||
|
||||
int32 probeIf = 2;
|
||||
//四元组
|
||||
/**
|
||||
* 请求端口
|
||||
*/
|
||||
int32 requestPort = 3;
|
||||
/**
|
||||
* 响应端口
|
||||
*/
|
||||
int32 responsePort = 4;
|
||||
/**
|
||||
* 请求IP
|
||||
*/
|
||||
int32 requestIp = 5;
|
||||
/**
|
||||
* 响应Ip
|
||||
*/
|
||||
int32 responseIp = 6;
|
||||
|
||||
/**
|
||||
* 源mac
|
||||
*/
|
||||
int64 srcMac = 7;
|
||||
|
||||
/**
|
||||
* 目的mac
|
||||
*/
|
||||
int64 dstMac = 8;
|
||||
|
||||
/**
|
||||
* 链路编号
|
||||
*/
|
||||
int32 vlanId = 9;
|
||||
|
||||
int32 tvSec = 10;
|
||||
|
||||
int32 tvUsec = 11;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
int32 startTm = 12;
|
||||
|
||||
/**
|
||||
* 总字节数
|
||||
*/
|
||||
int32 totalBytes = 13;
|
||||
|
||||
/**
|
||||
* 总包数
|
||||
*/
|
||||
int32 totalPackets = 14;
|
||||
/**
|
||||
* 总丢包数
|
||||
*/
|
||||
int32 totalDropPackets = 15;
|
||||
/**
|
||||
* 重传延时
|
||||
*/
|
||||
int32 retranTimeDelay = 16;
|
||||
/**
|
||||
* 客户端rtt
|
||||
*/
|
||||
int32 clientRtt = 17;
|
||||
|
||||
/**
|
||||
* 服务端Rtt
|
||||
*/
|
||||
int32 serverRtt = 18;
|
||||
|
||||
|
||||
/**
|
||||
* 用户响应时间
|
||||
*/
|
||||
int32 userResponseTime = 19;
|
||||
/**
|
||||
* 服务响应时间
|
||||
*/
|
||||
int32 serverResponseTime = 20;
|
||||
|
||||
|
||||
/**
|
||||
* tcp回话连接失败数
|
||||
*/
|
||||
int32 conFail = 21;
|
||||
|
||||
/**
|
||||
* 会话重置数
|
||||
*/
|
||||
// long reset = 22;
|
||||
|
||||
/**
|
||||
* 服务端总字节数
|
||||
*/
|
||||
int32 bytesIn = 23;
|
||||
/**
|
||||
* 客户端总字节数
|
||||
*/
|
||||
int32 bytesOut = 24;
|
||||
/**
|
||||
* 探针推送时间
|
||||
*/
|
||||
int32 timeFlag = 25;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
int32 endTm = 26;
|
||||
|
||||
/**
|
||||
* 结束时间微秒
|
||||
*/
|
||||
int32 endTmUsec = 27;
|
||||
|
||||
/**
|
||||
* 总响应数
|
||||
*/
|
||||
int32 responNum = 28;
|
||||
/**
|
||||
* 客户端零窗口数
|
||||
*/
|
||||
int32 csWindow = 29;
|
||||
/**
|
||||
* 服务端零窗口数
|
||||
*/
|
||||
int32 scWindow = 30;
|
||||
/**
|
||||
* 客户端重置数
|
||||
*/
|
||||
int32 csReset = 31;
|
||||
/**
|
||||
* 服务端重置数
|
||||
*/
|
||||
int32 scReset = 32;
|
||||
/**
|
||||
* 客户端重传数
|
||||
*/
|
||||
int32 csRetran = 33;
|
||||
/**
|
||||
* 服务端重传数
|
||||
*/
|
||||
int32 scRetran = 34;
|
||||
/**
|
||||
* 会话建立时间
|
||||
*/
|
||||
int32 connSetupTm = 35;
|
||||
/**
|
||||
* 新建会话数
|
||||
*/
|
||||
int32 newSession = 36;
|
||||
|
||||
int32 csAlert = 37;
|
||||
|
||||
int32 scAlert = 38;
|
||||
|
||||
string protocal = 39;
|
||||
}
|
||||
|
||||
|
||||
|
||||
25
src/main/proto/Base.proto
Normal file
25
src/main/proto/Base.proto
Normal file
@@ -0,0 +1,25 @@
|
||||
syntax = "proto3";
|
||||
|
||||
import "google/protobuf/any.proto";
|
||||
import "ApmBaseDataFlow.proto";
|
||||
|
||||
option java_multiple_files = false; //不要拆分成多个文件
|
||||
option java_package = "com.yuandian.dataflow.proto";
|
||||
|
||||
package com.yuandian.dataflow.proto;
|
||||
|
||||
message Response {
|
||||
int32 code = 1;
|
||||
int32 message = 2;
|
||||
repeated google.protobuf.Any packets = 4;
|
||||
}
|
||||
|
||||
message Request {
|
||||
int32 type = 1; // 请求类型. 默认 为 1. 暂无意义
|
||||
repeated google.protobuf.Any param = 2;
|
||||
string version = 3; // 请求版本. 区分版本. 非必要时不使用
|
||||
}
|
||||
|
||||
service CollectPacketsServer {
|
||||
rpc GetPackets (Request) returns (stream Response);
|
||||
}
|
||||
Reference in New Issue
Block a user