Rainbond/worker/server/pb/app_runtime_server.proto
2019-03-31 14:05:55 +08:00

106 lines
2.3 KiB
Protocol Buffer

syntax = "proto3";
package pb;
service AppRuntimeSync {
rpc GetAppStatus (ServicesRequest) returns (StatusMessage) {}
rpc GetAppPods (ServiceRequest) returns (ServiceAppPodList) {}
rpc GetDeployInfo (ServiceRequest) returns (DeployInfo) {}
rpc GetTenantResource (TenantRequest) returns (TenantResource) {}
rpc ListThirdPartyEndpoints (ServiceRequest) returns (ThirdPartyEndpoints) {}
rpc AddThirdPartyEndpoint (AddThirdPartyEndpointsReq) returns (Empty) {}
rpc UpdThirdPartyEndpoint (UpdThirdPartyEndpointsReq) returns (Empty) {}
rpc DelThirdPartyEndpoint (DelThirdPartyEndpointsReq) returns (Empty) {}
}
message Empty {}
message ServiceRequest {
string service_id = 1;
}
message ServicesRequest {
string service_ids = 1;
}
message TenantRequest {
string tenant_id = 1;
}
message StatusMessage {
map<string, string> status = 1;
}
message DiskMessage {
map<string, double> disks = 1;
}
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;
int64 memory_limit = 2;
}
message DeployInfo {
string namespace = 1;
string statefuleset = 2;
string deployment = 3;
map<string, string> pods = 4;
map<string, string> services = 5;
map<string, string> endpoints = 6;
map<string, string> secrets = 7;
map<string, string> ingresses = 8;
map<string, string> replicatset = 9;
string status = 10;
}
message TenantResource {
int64 cpu_request = 1;
int64 cpu_limit = 2;
int64 memory_request = 3;
int64 memory_limit = 4;
int64 running_app_num = 5;
}
message AddThirdPartyEndpointsReq {
string uuid = 1;
string sid = 2;
string ip = 3;
int32 port = 4;
bool is_online = 5;
}
message UpdThirdPartyEndpointsReq {
string uuid = 1;
string sid = 2;
string ip = 3;
int32 port = 4;
bool is_online = 5;
}
message DelThirdPartyEndpointsReq {
string uuid = 1;
string sid = 2;
}
message ThirdPartyEndpoint {
string uuid = 1;
string sid = 2;
string ip = 3;
int32 port = 4;
string status = 5;
bool is_online = 6;
}
message ThirdPartyEndpoints {
repeated ThirdPartyEndpoint obj = 1;
}