2020-09-13 19:27:47 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
option go_package = "./pb";
|
|
|
|
|
|
|
|
|
|
package pb;
|
|
|
|
|
|
2021-01-25 16:41:30 +08:00
|
|
|
import "models/model_node_group.proto";
|
|
|
|
|
import "models/rpc_messages.proto";
|
2020-10-28 18:21:26 +08:00
|
|
|
|
|
|
|
|
// 节点分组服务
|
|
|
|
|
service NodeGroupService {
|
|
|
|
|
// 创建分组
|
|
|
|
|
rpc createNodeGroup (CreateNodeGroupRequest) returns (CreateNodeGroupResponse);
|
|
|
|
|
|
|
|
|
|
// 修改分组
|
2020-11-13 18:23:06 +08:00
|
|
|
rpc updateNodeGroup (UpdateNodeGroupRequest) returns (RPCSuccess);
|
2020-10-28 18:21:26 +08:00
|
|
|
|
|
|
|
|
// 删除分组
|
2020-11-13 18:23:06 +08:00
|
|
|
rpc deleteNodeGroup (DeleteNodeGroupRequest) returns (RPCSuccess);
|
2020-10-28 18:21:26 +08:00
|
|
|
|
|
|
|
|
// 查询所有分组
|
2021-05-25 17:08:52 +08:00
|
|
|
rpc findAllEnabledNodeGroupsWithNodeClusterId (FindAllEnabledNodeGroupsWithNodeClusterIdRequest) returns (FindAllEnabledNodeGroupsWithNodeClusterIdResponse);
|
2020-10-28 18:21:26 +08:00
|
|
|
|
|
|
|
|
// 修改分组排序
|
2020-11-13 18:23:06 +08:00
|
|
|
rpc updateNodeGroupOrders (UpdateNodeGroupOrdersRequest) returns (RPCSuccess);
|
2020-10-28 18:21:26 +08:00
|
|
|
|
|
|
|
|
// 查找单个分组信息
|
|
|
|
|
rpc findEnabledNodeGroup (FindEnabledNodeGroupRequest) returns (FindEnabledNodeGroupResponse);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 创建分组
|
|
|
|
|
message CreateNodeGroupRequest {
|
2020-12-17 15:51:09 +08:00
|
|
|
int64 nodeClusterId = 1;
|
2020-10-28 18:21:26 +08:00
|
|
|
string name = 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message CreateNodeGroupResponse {
|
2021-05-25 17:49:05 +08:00
|
|
|
int64 nodeGroupId = 1;
|
2020-10-28 18:21:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 修改分组
|
|
|
|
|
message UpdateNodeGroupRequest {
|
2021-05-25 17:49:05 +08:00
|
|
|
int64 nodeGroupId = 1;
|
2020-10-28 18:21:26 +08:00
|
|
|
string name = 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 删除分组
|
|
|
|
|
message DeleteNodeGroupRequest {
|
2021-05-25 17:49:05 +08:00
|
|
|
int64 nodeGroupId = 1;
|
2020-10-28 18:21:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 查询所有分组
|
2021-05-25 17:08:52 +08:00
|
|
|
message FindAllEnabledNodeGroupsWithNodeClusterIdRequest {
|
2020-12-17 15:51:09 +08:00
|
|
|
int64 nodeClusterId = 1;
|
2020-10-28 18:21:26 +08:00
|
|
|
}
|
|
|
|
|
|
2021-05-25 17:08:52 +08:00
|
|
|
message FindAllEnabledNodeGroupsWithNodeClusterIdResponse {
|
2021-05-25 17:49:05 +08:00
|
|
|
repeated NodeGroup nodeGroups = 1;
|
2020-10-28 18:21:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 修改分组排序
|
|
|
|
|
message UpdateNodeGroupOrdersRequest {
|
2021-05-25 17:49:05 +08:00
|
|
|
repeated int64 nodeGroupIds = 1;
|
2020-10-28 18:21:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 查找单个分组信息
|
|
|
|
|
message FindEnabledNodeGroupRequest {
|
2021-05-25 17:49:05 +08:00
|
|
|
int64 nodeGroupId = 1;
|
2020-10-28 18:21:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message FindEnabledNodeGroupResponse {
|
2021-05-25 17:49:05 +08:00
|
|
|
NodeGroup nodeGroup = 1;
|
2020-10-28 18:21:26 +08:00
|
|
|
}
|