Complete project pivot (#55)

Complete project pivot
This commit is contained in:
2022-01-12 08:57:21 +01:00
committed by GitHub
parent 70aa5332a9
commit bd581db472
46 changed files with 2638 additions and 1396 deletions

56
proto/portal/portal.proto Normal file
View File

@@ -0,0 +1,56 @@
syntax = "proto3";
option go_package = "github.com/speedrunsh/speedrun/proto/portal";
package portal;
enum State {
UNKNOWN = 0;
CHANGED = 1;
UNCHANGED = 2;
}
message CommandRequest {
string name = 1;
repeated string args = 2;
}
message CommandResponse {
State state = 1;
string message = 2;
}
message ServiceRequest {
string name = 1;
}
message ServiceResponse {
State state = 1;
string message = 2;
}
message ServiceStatusResponse {
State state = 1;
string loadstate = 2;
string activestate = 3;
string substate = 4;
}
message CPUusageRequest {}
message CPUusageResponse {
int32 loadavg1 = 1;
int32 loadavg5 = 2;
int32 loadavg15 = 3;
}
service Portal {
rpc ServiceRestart(ServiceRequest) returns (ServiceResponse) {}
rpc ServiceStart(ServiceRequest) returns (ServiceResponse) {}
rpc ServiceStop(ServiceRequest) returns (ServiceResponse) {}
rpc ServiceStatus(ServiceRequest) returns (ServiceStatusResponse) {}
rpc RunCommand(CommandRequest) returns (CommandResponse) {}
rpc CPUusage(CPUusageRequest) returns (CPUusageResponse) {
} // --target group1 --target group2
// rpc CPUProfile(CPUProfileRequest) returns (CPUProfileResponse) {}
// rpc MemProfile(MemProfileRequest) returns (MemProfileResponse) {}
// rpc EnsureMountedDisk()
}