56 lines
1.3 KiB
Protocol Buffer
56 lines
1.3 KiB
Protocol Buffer
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()
|
|
} |