46 lines
915 B
Protocol Buffer
46 lines
915 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
import "loafle.com/overflow/central_api_gateway/commons/commons.proto";
|
|
|
|
enum TaskResultState {
|
|
FAILED = 0;
|
|
SUCCEED = 1;
|
|
PROCEEDING = 2;
|
|
}
|
|
|
|
message TaskResultEvent {
|
|
string agentId = 1;
|
|
string taskId = 2;
|
|
TaskEventType evtType = 3;
|
|
int64 occurredDate = 4;
|
|
TaskResultState result = 5;
|
|
map<string, string> data = 6;
|
|
}
|
|
|
|
service TaskResult {
|
|
rpc event(TaskResultEvent) returns (Void){}
|
|
}
|
|
|
|
|
|
message AgentEvent {
|
|
string agentId = 1;
|
|
enum AgentEventType {
|
|
AGENT_STARTED = 0;
|
|
AGENT_ERROR = 1;
|
|
AGENT_STOP = 2;
|
|
}
|
|
AgentEventType evtType = 2;
|
|
int64 occurredDate = 3;
|
|
string description = 4;
|
|
message ErrorInfo {
|
|
int32 errorNum = 1;
|
|
string from = 2;
|
|
string errorMessage = 3;
|
|
}
|
|
ErrorInfo errInfo = 5;
|
|
}
|
|
|
|
service Event {
|
|
rpc event(AgentEvent) returns (Void){}
|
|
}
|
|
//Event-relative area |