This commit is contained in:
insanity@loafle.com 2017-05-20 15:05:19 +09:00
parent f44fec8c60
commit 821bf6b1d6

View File

@ -4,23 +4,23 @@ syntax = "proto3";
message Empty {} message Empty {}
//Event-relative area //Event-relative area
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;
}
message DiscoveryEvent { message DiscoveryEvent {
string agentId = 1; string agentId = 1;
string taskId = 2; 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; DiscoveryEventType evtType = 3;
int64 occurredDate = 4; int64 occurredDate = 4;
map<string, string> data = 5; map<string, string> data = 5;
@ -30,17 +30,6 @@ service Discovery {
rpc event(DiscoveryEvent) returns (Empty){} rpc event(DiscoveryEvent) returns (Empty){}
} }
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;
}
enum TaskResultState { enum TaskResultState {
FAILED = 0; FAILED = 0;
@ -51,6 +40,17 @@ enum TaskResultState {
message TaskResultEvent { message TaskResultEvent {
string agentId = 1; string agentId = 1;
string taskId = 2; 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; TaskResultEventType evtType = 3;
int64 occurredDate = 4; int64 occurredDate = 4;
TaskResultState result = 5; TaskResultState result = 5;
@ -61,23 +61,22 @@ service TaskResult {
rpc event(TaskResultEvent) returns (Empty){} rpc event(TaskResultEvent) returns (Empty){}
} }
enum AgentEventType {
AGENT_STARTED = 0;
AGENT_ERROR = 1;
AGENT_STOP = 2;
}
message ErrorInfo {
int32 errorNum = 1;
string from = 2;
string errorMessage = 3;
}
message AgentEvent { message AgentEvent {
string agentId = 1; string agentId = 1;
enum AgentEventType {
AGENT_STARTED = 0;
AGENT_ERROR = 1;
AGENT_STOP = 2;
}
AgentEventType evtType = 2; AgentEventType evtType = 2;
int64 occurredDate = 3; int64 occurredDate = 3;
string description = 4; string description = 4;
message ErrorInfo {
int32 errorNum = 1;
string from = 2;
string errorMessage = 3;
}
ErrorInfo errInfo = 5; ErrorInfo errInfo = 5;
} }