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

View File

@ -4,6 +4,10 @@ syntax = "proto3";
message Empty {} message Empty {}
//Event-relative area //Event-relative area
message DiscoveryEvent {
string agentId = 1;
string taskId = 2;
enum DiscoveryEventType { enum DiscoveryEventType {
DISCOVERY_START = 0; DISCOVERY_START = 0;
DISCOVERY_HOST_START = 1; DISCOVERY_HOST_START = 1;
@ -17,10 +21,6 @@ enum DiscoveryEventType {
DISCOVERY_SERVICE_DONE = 9; DISCOVERY_SERVICE_DONE = 9;
DISCOVERY_DONE = 10; DISCOVERY_DONE = 10;
} }
message DiscoveryEvent {
string agentId = 1;
string taskId = 2;
DiscoveryEventType evtType = 3; DiscoveryEventType evtType = 3;
int64 occurredDate = 4; int64 occurredDate = 4;
map<string, string> data = 5; map<string, string> data = 5;
@ -30,6 +30,16 @@ service Discovery {
rpc event(DiscoveryEvent) returns (Empty){} rpc event(DiscoveryEvent) returns (Empty){}
} }
enum TaskResultState {
FAILED = 0;
SUCCEED = 1;
PROCEEDING = 2;
}
message TaskResultEvent {
string agentId = 1;
string taskId = 2;
enum TaskResultEventType { enum TaskResultEventType {
TASK_POL_INTERVAL_UPDATE = 0; TASK_POL_INTERVAL_UPDATE = 0;
TASK_SENSOR_START = 1; TASK_SENSOR_START = 1;
@ -41,16 +51,6 @@ enum TaskResultEventType {
TASK_AGENT_UPDATE = 7; TASK_AGENT_UPDATE = 7;
TASK_LOG_SEND = 8; TASK_LOG_SEND = 8;
} }
enum TaskResultState {
FAILED = 0;
SUCCEED = 1;
PROCEEDING = 2;
}
message TaskResultEvent {
string agentId = 1;
string taskId = 2;
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){}
} }
message AgentEvent {
string agentId = 1;
enum AgentEventType { enum AgentEventType {
AGENT_STARTED = 0; AGENT_STARTED = 0;
AGENT_ERROR = 1; AGENT_ERROR = 1;
AGENT_STOP = 2; AGENT_STOP = 2;
} }
AgentEventType evtType = 2;
int64 occurredDate = 3;
string description = 4;
message ErrorInfo { message ErrorInfo {
int32 errorNum = 1; int32 errorNum = 1;
string from = 2; string from = 2;
string errorMessage = 3; string errorMessage = 3;
} }
message AgentEvent {
string agentId = 1;
AgentEventType evtType = 2;
int64 occurredDate = 3;
string description = 4;
ErrorInfo errInfo = 5; ErrorInfo errInfo = 5;
} }