houston package 독립
This commit is contained in:
5
protos/empty.proto
Normal file
5
protos/empty.proto
Normal file
@ -0,0 +1,5 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "common/protos";
|
||||
|
||||
message Empty {
|
||||
}
|
||||
16
protos/monitor.proto
Normal file
16
protos/monitor.proto
Normal file
@ -0,0 +1,16 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "common/protos";
|
||||
import "protos/empty.proto";
|
||||
|
||||
service Monitor {
|
||||
rpc Report(Metrics) returns (Empty) {}
|
||||
}
|
||||
|
||||
message Metrics {
|
||||
string hostname = 1;
|
||||
float cpu = 3;
|
||||
uint32 total = 4;
|
||||
uint32 free = 5;
|
||||
map<string, float> metrics = 6;
|
||||
}
|
||||
|
||||
46
protos/operation.proto
Normal file
46
protos/operation.proto
Normal file
@ -0,0 +1,46 @@
|
||||
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) {}
|
||||
}
|
||||
|
||||
message VersionAndArgs {
|
||||
string version = 1;
|
||||
repeated string args = 2;
|
||||
}
|
||||
|
||||
message DeployedVersions {
|
||||
string name = 1;
|
||||
repeated VersionAndArgs versions = 2;
|
||||
}
|
||||
|
||||
message OperationQueryRequest {
|
||||
string hostname = 1;
|
||||
repeated ProcessDescription procs = 2;
|
||||
repeated DeployedVersions deploys = 3;
|
||||
}
|
||||
|
||||
enum ProcessState {
|
||||
Stopped = 0;
|
||||
Stopping = 1;
|
||||
Running = 2;
|
||||
Error = 3;
|
||||
}
|
||||
|
||||
message ProcessDescription {
|
||||
string name = 1;
|
||||
repeated string args = 2;
|
||||
string version = 3;
|
||||
ProcessState state = 4;
|
||||
int32 pid = 5;
|
||||
int32 stdout_size = 6;
|
||||
int32 stderr_size = 7;
|
||||
}
|
||||
|
||||
message OperationQueryResponse {
|
||||
string operation = 1;
|
||||
map<string, string> args = 2;
|
||||
}
|
||||
Reference in New Issue
Block a user