syntax = "proto3"; option go_package = "github.com/dpogorzelski/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; } message FileReadRequest { string path = 1; } message FileReadResponse { State state = 1; string content = 2; } message SystemRebootRequest {} message SystemRebootResponse { State state = 1; string message = 2; } 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) {} rpc FileRead(FileReadRequest) returns (FileReadResponse) {} rpc SystemReboot(SystemRebootRequest) returns (SystemRebootResponse) {} // --target group1 --target group2 // rpc CPUProfile(CPUProfileRequest) returns (CPUProfileResponse) {} // rpc MemProfile(MemProfileRequest) returns (MemProfileResponse) {} // rpc EnsureMountedDisk() }