This commit is contained in:
insanity@loafle.com 2017-05-20 17:01:21 +09:00
parent 821bf6b1d6
commit eab524ca83
4 changed files with 49 additions and 51 deletions

16
data/data.proto Normal file
View File

@ -0,0 +1,16 @@
syntax = "proto3";
message Empty {}
message CollectedData {
string agentId = 1;
string sensorId = 2;
map<string, string> data = 3;
int64 startDate = 4;
int64 finishDate = 5;
}
service Data {
rpc sendMetric(CollectedData) returns (Empty) {}
rpc sendMeta(CollectedData) returns (Empty) {}
}

View File

@ -1,10 +1,8 @@
syntax = "proto3";
message Empty {}
//Event-relative area
message DiscoveryEvent {
string agentId = 1;
string taskId = 2;
@ -84,51 +82,3 @@ service Event {
rpc event(AgentEvent) returns (Empty){}
}
//Event-relative area
//Data-relative area
message CollectedData {
string agentId = 1;
string sensorId = 2;
map<string, string> data = 3;
int64 startDate = 4;
int64 finishDate = 5;
}
service Data {
rpc sendMetric(CollectedData) returns (Empty) {}
rpc sendMeta(CollectedData) returns (Empty) {}
}
//Data-relative area
//Task polling-relative area
message TaskInfo {
string command = 1;
string taskId = 2;
map<string, string> data = 3;
}
message TaskList {
repeated TaskInfo taskList = 1;
}
service Task {
rpc requestTask(Empty) returns (TaskList) {}
}
//Task polling-relative area
//Init-relative area
message AgentInfo {
string agentId = 1;
}
message InitResponse {
string secretKey = 1;
}
service Initializer {
rpc agentStarting(AgentInfo) returns (InitResponse) {}
}
//Init-relative area

View File

@ -0,0 +1,15 @@
syntax = "proto3";
message Empty {}
message AgentInfo {
string agentId = 1;
}
message InitResponse {
string secretKey = 1;
}
service Initializer {
rpc agentStarting(AgentInfo) returns (InitResponse) {}
}

17
task/task.proto Normal file
View File

@ -0,0 +1,17 @@
syntax = "proto3";
message Empty {}
message TaskInfo {
string command = 1;
string taskId = 2;
map<string, string> data = 3;
}
message TaskList {
repeated TaskInfo taskList = 1;
}
service Task {
rpc requestTask(Empty) returns (TaskList) {}
}