proto
This commit is contained in:
parent
04b2bb6546
commit
54608d4fd5
28
commons/commons.proto
Normal file
28
commons/commons.proto
Normal file
|
@ -0,0 +1,28 @@
|
|||
syntax = "proto3";
|
||||
|
||||
enum DiscoveryEventType {
|
||||
DISCOVERY_START = 0;
|
||||
DISCOVERY_HOST_START = 1;
|
||||
DISCOVERY_HOST_FOUND = 2;
|
||||
DISCOVERY_HOST_DONE = 3;
|
||||
DISCOVERY_PORT_START = 4;
|
||||
DISCOVERY_PORT_FOUND = 5;
|
||||
DISCOVERY_PORT_DONE = 6;
|
||||
DISCOVERY_SERVICE_START = 7;
|
||||
DISCOVERY_SERVICE_FOUND = 8;
|
||||
DISCOVERY_SERVICE_DONE = 9;
|
||||
DISCOVERY_DONE = 10;
|
||||
}
|
||||
|
||||
enum TaskEventType {
|
||||
TASK_POL_INTERVAL_UPDATE = 0;
|
||||
TASK_SENSOR_START = 1;
|
||||
TASK_SENSOR_STOP = 2;
|
||||
TASK_SENSOR_ADD = 3;
|
||||
TASK_SENSOR_REMOVE = 4;
|
||||
TASK_SENSOR_UPDATE = 5;
|
||||
TASK_CRAWLER_UPDATE = 6;
|
||||
TASK_AGENT_UPDATE = 7;
|
||||
TASK_LOG_SEND = 8;
|
||||
TASK_DISCOVERY = 9;
|
||||
}
|
|
@ -2,33 +2,10 @@ syntax = "proto3";
|
|||
|
||||
message Empty {}
|
||||
|
||||
//Event-relative area
|
||||
message DiscoveryEvent {
|
||||
string agentId = 1;
|
||||
string taskId = 2;
|
||||
enum DiscoveryEventType {
|
||||
DISCOVERY_START = 0;
|
||||
DISCOVERY_HOST_START = 1;
|
||||
DISCOVERY_HOST_FOUND = 2;
|
||||
DISCOVERY_HOST_DONE = 3;
|
||||
DISCOVERY_PORT_START = 4;
|
||||
DISCOVERY_PORT_FOUND = 5;
|
||||
DISCOVERY_PORT_DONE = 6;
|
||||
DISCOVERY_SERVICE_START = 7;
|
||||
DISCOVERY_SERVICE_FOUND = 8;
|
||||
DISCOVERY_SERVICE_DONE = 9;
|
||||
DISCOVERY_DONE = 10;
|
||||
}
|
||||
DiscoveryEventType evtType = 3;
|
||||
int64 occurredDate = 4;
|
||||
map<string, string> data = 5;
|
||||
}
|
||||
|
||||
service Discovery {
|
||||
rpc event(DiscoveryEvent) returns (Empty){}
|
||||
}
|
||||
|
||||
|
||||
enum TaskResultState {
|
||||
FAILED = 0;
|
||||
SUCCEED = 1;
|
||||
|
@ -38,21 +15,10 @@ enum TaskResultState {
|
|||
message TaskResultEvent {
|
||||
string agentId = 1;
|
||||
string taskId = 2;
|
||||
enum TaskResultEventType {
|
||||
TASK_POL_INTERVAL_UPDATE = 0;
|
||||
TASK_SENSOR_START = 1;
|
||||
TASK_SENSOR_STOP = 2;
|
||||
TASK_SENSOR_ADD = 3;
|
||||
TASK_SENSOR_REMOVE = 4;
|
||||
TASK_SENSOR_UPDATE = 5;
|
||||
TASK_CRAWLER_UPDATE = 6;
|
||||
TASK_AGENT_UPDATE = 7;
|
||||
TASK_LOG_SEND = 8;
|
||||
}
|
||||
TaskResultEventType evtType = 3;
|
||||
TaskEventType evtType = 3;
|
||||
int64 occurredDate = 4;
|
||||
TaskResultState result = 5;
|
||||
string description = 6;
|
||||
map<string, string> data = 6;
|
||||
}
|
||||
|
||||
service TaskResult {
|
||||
|
|
|
@ -3,7 +3,7 @@ syntax = "proto3";
|
|||
message Empty {}
|
||||
|
||||
message TaskInfo {
|
||||
string command = 1;
|
||||
TaskEvent command = 1;
|
||||
string taskId = 2;
|
||||
map<string, string> data = 3;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user