central_api_gateway/event/event.proto
2017-05-20 18:44:08 +09:00

48 lines
935 B
Protocol Buffer

syntax = "proto3";
import "loafle.com/overflow/central_api_gateway/commons/commons.proto";
message Empty {}
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 (Empty){}
}
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 (Empty){}
}
//Event-relative area