2018-11-17 18:08:33 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
package pb;
|
|
|
|
|
|
|
|
service AppRuntimeSync {
|
2018-11-22 14:33:29 +08:00
|
|
|
rpc GetAppStatus (ServicesRequest) returns (StatusMessage) {}
|
|
|
|
rpc GetAppPods (ServiceRequest) returns (ServiceAppPodList) {}
|
2018-12-07 13:45:47 +08:00
|
|
|
rpc GetDeployInfo (ServiceRequest) returns (DeployInfo) {}
|
2019-01-28 16:00:51 +08:00
|
|
|
rpc GetTenantResource (TenantRequest) returns (TenantResource) {}
|
2019-03-01 13:27:27 +08:00
|
|
|
rpc GetThirdPartyEndpointsStatus (ServiceRequest) returns (ThirdPartyEndpointsStatus) {}
|
2018-11-17 18:08:33 +08:00
|
|
|
}
|
|
|
|
|
2019-03-01 13:27:27 +08:00
|
|
|
message ServiceRequest {
|
2018-11-22 14:33:29 +08:00
|
|
|
string service_id = 1;
|
|
|
|
}
|
|
|
|
message ServicesRequest {
|
2018-11-17 18:08:33 +08:00
|
|
|
string service_ids = 1;
|
|
|
|
}
|
2019-01-28 16:00:51 +08:00
|
|
|
message TenantRequest {
|
|
|
|
string tenant_id = 1;
|
|
|
|
}
|
2018-11-17 18:08:33 +08:00
|
|
|
|
|
|
|
message StatusMessage {
|
|
|
|
map<string, string> status = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DiskMessage {
|
|
|
|
map<string, double> disks = 1;
|
2018-11-22 14:33:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message ServiceAppPodList {
|
|
|
|
repeated ServiceAppPod pods = 1;
|
|
|
|
}
|
|
|
|
message ServiceAppPod {
|
|
|
|
string service_id = 1;
|
|
|
|
string deploy_id = 2;
|
|
|
|
string deploy_type = 3;
|
|
|
|
string pod_name = 4;
|
|
|
|
string pod_ip = 5;
|
|
|
|
string pod_status = 6;
|
|
|
|
map<string, Container> containers = 7;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Container {
|
|
|
|
string container_name = 1;
|
2019-01-28 16:00:51 +08:00
|
|
|
int64 memory_limit = 2;
|
2018-12-07 13:45:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message DeployInfo {
|
|
|
|
string namespace = 1;
|
|
|
|
string statefuleset = 2;
|
|
|
|
string deployment = 3;
|
|
|
|
map<string, string> pods = 4;
|
|
|
|
map<string, string> services = 5;
|
|
|
|
map<string, string> secrets = 6;
|
|
|
|
map<string, string> ingresses = 7;
|
|
|
|
map<string, string> replicatset = 8;
|
2018-12-08 12:58:40 +08:00
|
|
|
string status = 9;
|
2019-01-28 16:00:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message TenantResource {
|
|
|
|
int64 cpu_request = 1;
|
|
|
|
int64 cpu_limit = 2;
|
|
|
|
int64 memory_request = 3;
|
|
|
|
int64 memory_limit = 4;
|
|
|
|
int64 running_app_num = 5;
|
2019-03-01 13:27:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message ThirdPartyEndpointsStatus {
|
|
|
|
map<string, bool> status = 1;
|
2018-11-17 18:08:33 +08:00
|
|
|
}
|