2017-05-19 11:11:41 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2017-05-20 09:44:08 +00:00
|
|
|
import "loafle.com/overflow/central_api_gateway/commons/commons.proto";
|
2017-05-19 11:11:41 +00:00
|
|
|
|
2017-05-20 09:44:08 +00:00
|
|
|
message Empty {}
|
2017-05-19 11:11:41 +00:00
|
|
|
|
|
|
|
enum TaskResultState {
|
|
|
|
FAILED = 0;
|
|
|
|
SUCCEED = 1;
|
|
|
|
PROCEEDING = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TaskResultEvent {
|
|
|
|
string agentId = 1;
|
|
|
|
string taskId = 2;
|
2017-05-20 09:27:30 +00:00
|
|
|
TaskEventType evtType = 3;
|
2017-05-19 11:11:41 +00:00
|
|
|
int64 occurredDate = 4;
|
|
|
|
TaskResultState result = 5;
|
2017-05-20 09:27:30 +00:00
|
|
|
map<string, string> data = 6;
|
2017-05-19 11:11:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
service TaskResult {
|
|
|
|
rpc event(TaskResultEvent) returns (Empty){}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message AgentEvent {
|
|
|
|
string agentId = 1;
|
2017-05-20 06:05:19 +00:00
|
|
|
enum AgentEventType {
|
|
|
|
AGENT_STARTED = 0;
|
|
|
|
AGENT_ERROR = 1;
|
|
|
|
AGENT_STOP = 2;
|
|
|
|
}
|
2017-05-19 11:11:41 +00:00
|
|
|
AgentEventType evtType = 2;
|
|
|
|
int64 occurredDate = 3;
|
|
|
|
string description = 4;
|
2017-05-20 06:05:19 +00:00
|
|
|
message ErrorInfo {
|
|
|
|
int32 errorNum = 1;
|
|
|
|
string from = 2;
|
|
|
|
string errorMessage = 3;
|
|
|
|
}
|
2017-05-19 11:11:41 +00:00
|
|
|
ErrorInfo errInfo = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
service Event {
|
|
|
|
rpc event(AgentEvent) returns (Empty){}
|
|
|
|
}
|
2017-05-20 08:01:21 +00:00
|
|
|
//Event-relative area
|