Files
houston/protos/operation.proto

58 lines
1.2 KiB
Protocol Buffer
Raw Permalink Normal View History

2023-05-21 23:37:54 +09:00
syntax = "proto3";
option go_package = "common/protos";
import "protos/empty.proto";
service Operation {
rpc Query(stream OperationQueryRequest) returns (stream OperationQueryResponse) {}
rpc Refresh(OperationQueryRequest) returns (Empty) {}
2023-10-24 20:08:48 +09:00
rpc ReportDeployingProgress(DeployingProgress) returns (Empty) {}
2023-05-21 23:37:54 +09:00
}
message VersionAndArgs {
string version = 1;
repeated string args = 2;
}
message DeployedVersions {
string name = 1;
repeated VersionAndArgs versions = 2;
2023-05-21 23:37:54 +09:00
}
message OperationQueryRequest {
string hostname = 1;
string public_ip = 4;
string private_ip =5;
repeated ProcessDescription procs = 2;
2023-05-21 23:37:54 +09:00
repeated DeployedVersions deploys = 3;
}
enum ProcessState {
Stopped = 0;
Stopping = 1;
Running = 2;
2023-06-27 09:44:56 +09:00
Restart = 3;
Error = 4;
2023-05-21 23:37:54 +09:00
}
message ProcessDescription {
string name = 1;
repeated string args = 2;
string version = 3;
ProcessState state = 4;
int32 pid = 5;
}
message OperationQueryResponse {
string operation = 1;
map<string, string> args = 2;
2023-10-24 20:08:48 +09:00
}
message DeployingProgress {
string hostname = 1;
string name = 2;
string version = 3;
string state = 4;
int64 progress = 5;
int64 total = 6;
2023-05-21 23:37:54 +09:00
}