💥 v2.0 必须更新面板,新增服务监控

This commit is contained in:
naiba
2021-01-16 00:45:49 +08:00
parent 0ce8017875
commit a41c792577
38 changed files with 1015 additions and 453 deletions

View File

@@ -1,11 +1,13 @@
syntax = "proto3";
option go_package = "proto";
package proto;
service NezhaService {
rpc Heartbeat(Beat)returns(stream Command){}
rpc ReportState(State)returns(Receipt){}
rpc Register(Host)returns(Receipt){}
rpc ReportSystemState(State)returns(Receipt){}
rpc ReportSystemInfo(Host)returns(Receipt){}
rpc ReportTask(TaskResult)returns(Receipt){}
rpc RequestTask(Host)returns(stream Task){}
}
message Host {
@@ -35,15 +37,20 @@ message State {
uint64 uptime = 10;
}
message Task {
uint64 id = 1;
uint64 type = 2;
string data = 3;
}
message TaskResult {
uint64 id = 1;
uint64 type = 2;
float delay = 3;
string data = 4;
bool successful = 5;
}
message Receipt{
bool proced = 1;
}
message Beat {
string timestamp = 1;
}
message Command {
uint64 type = 1;
string data = 2;
}