2020-09-13 19:27:47 +08:00
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
option go_package = "./pb";
|
|
|
|
|
|
|
|
|
|
|
|
package pb;
|
2020-10-26 21:15:13 +08:00
|
|
|
|
|
2021-01-25 16:41:30 +08:00
|
|
|
|
import "models/model_node.proto";
|
|
|
|
|
|
import "models/model_node_login.proto";
|
|
|
|
|
|
import "models/model_node_install_status.proto";
|
|
|
|
|
|
import "models/model_dns_route.proto";
|
2021-05-12 21:38:02 +08:00
|
|
|
|
import "models/model_size_capacity.proto";
|
2021-01-25 16:41:30 +08:00
|
|
|
|
import "models/rpc_messages.proto";
|
2020-09-13 19:27:47 +08:00
|
|
|
|
|
|
|
|
|
|
service NodeService {
|
|
|
|
|
|
// 创建节点
|
|
|
|
|
|
rpc createNode (CreateNodeRequest) returns (CreateNodeResponse);
|
|
|
|
|
|
|
2020-10-17 11:14:44 +08:00
|
|
|
|
// 注册集群节点
|
|
|
|
|
|
rpc registerClusterNode (RegisterClusterNodeRequest) returns (RegisterClusterNodeResponse);
|
|
|
|
|
|
|
2021-05-26 14:40:21 +08:00
|
|
|
|
// 所有可用的节点数量
|
2020-11-12 14:41:23 +08:00
|
|
|
|
rpc countAllEnabledNodes (CountAllEnabledNodesRequest) returns (RPCCountResponse);
|
2020-09-13 19:27:47 +08:00
|
|
|
|
|
|
|
|
|
|
// 计算匹配的节点数量
|
2020-11-12 14:41:23 +08:00
|
|
|
|
rpc countAllEnabledNodesMatch (CountAllEnabledNodesMatchRequest) returns (RPCCountResponse);
|
2020-09-13 19:27:47 +08:00
|
|
|
|
|
|
|
|
|
|
// 列出单页节点
|
|
|
|
|
|
rpc listEnabledNodesMatch (ListEnabledNodesMatchRequest) returns (ListEnabledNodesMatchResponse);
|
|
|
|
|
|
|
2020-10-04 16:10:19 +08:00
|
|
|
|
// 根据集群查找所有节点
|
2021-05-25 17:08:52 +08:00
|
|
|
|
rpc findAllEnabledNodesWithNodeClusterId (FindAllEnabledNodesWithNodeClusterIdRequest) returns (FindAllEnabledNodesWithNodeClusterIdResponse);
|
2020-10-04 16:10:19 +08:00
|
|
|
|
|
2020-11-15 21:17:37 +08:00
|
|
|
|
// 删除节点
|
|
|
|
|
|
rpc deleteNode (DeleteNodeRequest) returns (RPCSuccess);
|
2020-09-13 19:27:47 +08:00
|
|
|
|
|
2021-07-31 22:23:16 +08:00
|
|
|
|
// 从集群中删除节点
|
|
|
|
|
|
rpc deleteNodeFromNodeCluster (DeleteNodeFromNodeClusterRequest) returns (RPCSuccess);
|
|
|
|
|
|
|
2020-09-13 19:27:47 +08:00
|
|
|
|
// 修改节点
|
2020-11-13 18:23:06 +08:00
|
|
|
|
rpc updateNode (UpdateNodeRequest) returns (RPCSuccess);
|
2020-09-13 19:27:47 +08:00
|
|
|
|
|
2021-05-26 14:40:21 +08:00
|
|
|
|
// 获取单个节点信息
|
2020-09-13 19:27:47 +08:00
|
|
|
|
rpc findEnabledNode (FindEnabledNodeRequest) returns (FindEnabledNodeResponse);
|
|
|
|
|
|
|
2021-08-31 17:24:41 +08:00
|
|
|
|
// 获取单个节点基本信息
|
|
|
|
|
|
rpc findEnabledBasicNode (FindEnabledBasicNodeRequest) returns (FindEnabledBasicNodeResponse);
|
|
|
|
|
|
|
2020-11-02 22:14:28 +08:00
|
|
|
|
// 获取当前节点配置
|
|
|
|
|
|
rpc findCurrentNodeConfig (FindCurrentNodeConfigRequest) returns (FindCurrentNodeConfigResponse);
|
2020-09-13 19:27:47 +08:00
|
|
|
|
|
|
|
|
|
|
// 节点stream
|
2020-10-04 16:10:19 +08:00
|
|
|
|
rpc nodeStream (stream NodeStreamMessage) returns (stream NodeStreamMessage);
|
|
|
|
|
|
|
|
|
|
|
|
// 向节点发送命令
|
|
|
|
|
|
rpc sendCommandToNode (NodeStreamMessage) returns (NodeStreamMessage);
|
2020-09-13 19:27:47 +08:00
|
|
|
|
|
|
|
|
|
|
// 更新节点状态
|
2020-11-13 18:23:06 +08:00
|
|
|
|
rpc updateNodeStatus (UpdateNodeStatusRequest) returns (RPCSuccess);
|
2020-09-13 19:27:47 +08:00
|
|
|
|
|
|
|
|
|
|
// 修改节点安装状态
|
2020-11-13 18:23:06 +08:00
|
|
|
|
rpc updateNodeIsInstalled (UpdateNodeIsInstalledRequest) returns (RPCSuccess);
|
2020-09-13 19:27:47 +08:00
|
|
|
|
|
|
|
|
|
|
// 安装节点
|
|
|
|
|
|
rpc installNode (InstallNodeRequest) returns (InstallNodeResponse);
|
2020-10-04 16:10:19 +08:00
|
|
|
|
|
2020-10-28 12:36:11 +08:00
|
|
|
|
// 升级节点
|
|
|
|
|
|
rpc upgradeNode (UpgradeNodeRequest) returns (UpgradeNodeResponse);
|
|
|
|
|
|
|
2020-10-27 12:33:18 +08:00
|
|
|
|
// 启动节点
|
|
|
|
|
|
rpc startNode (StartNodeRequest) returns (StartNodeResponse);
|
|
|
|
|
|
|
|
|
|
|
|
// 停止节点
|
|
|
|
|
|
rpc stopNode (StopNodeRequest) returns (StopNodeResponse);
|
|
|
|
|
|
|
2020-10-04 16:10:19 +08:00
|
|
|
|
// 更改节点连接的API节点信息
|
2020-11-13 18:23:06 +08:00
|
|
|
|
rpc updateNodeConnectedAPINodes (UpdateNodeConnectedAPINodesRequest) returns (RPCSuccess);
|
2020-10-25 21:27:49 +08:00
|
|
|
|
|
|
|
|
|
|
// 计算使用某个认证的节点数量
|
2021-05-25 17:08:52 +08:00
|
|
|
|
rpc countAllEnabledNodesWithNodeGrantId (CountAllEnabledNodesWithNodeGrantIdRequest) returns (RPCCountResponse);
|
2020-10-25 21:27:49 +08:00
|
|
|
|
|
|
|
|
|
|
// 查找使用某个认证的所有节点
|
2021-05-25 17:08:52 +08:00
|
|
|
|
rpc findAllEnabledNodesWithNodeGrantId (FindAllEnabledNodesWithNodeGrantIdRequest) returns (FindAllEnabledNodesWithNodeGrantIdResponse);
|
2020-10-26 21:15:13 +08:00
|
|
|
|
|
2021-01-31 16:01:15 +08:00
|
|
|
|
// 计算没有安装的节点数量
|
2021-05-25 17:08:52 +08:00
|
|
|
|
rpc countAllNotInstalledNodesWithNodeClusterId (CountAllNotInstalledNodesWithNodeClusterIdRequest) returns (RPCCountResponse);
|
2021-01-31 16:01:15 +08:00
|
|
|
|
|
2020-10-26 21:15:13 +08:00
|
|
|
|
// 列出所有未安装的节点
|
2021-05-25 17:08:52 +08:00
|
|
|
|
rpc findAllNotInstalledNodesWithNodeClusterId (FindAllNotInstalledNodesWithNodeClusterIdRequest) returns (FindAllNotInstalledNodesWithNodeClusterIdResponse);
|
2020-10-26 21:15:13 +08:00
|
|
|
|
|
2020-11-30 20:01:27 +08:00
|
|
|
|
// 计算需要升级的节点数量
|
2021-05-25 17:08:52 +08:00
|
|
|
|
rpc countAllUpgradeNodesWithNodeClusterId (CountAllUpgradeNodesWithNodeClusterIdRequest) returns (RPCCountResponse);
|
2020-11-30 20:01:27 +08:00
|
|
|
|
|
2020-10-28 12:36:11 +08:00
|
|
|
|
// 列出所有需要升级的节点
|
2021-05-25 17:08:52 +08:00
|
|
|
|
rpc findAllUpgradeNodesWithNodeClusterId (FindAllUpgradeNodesWithNodeClusterIdRequest) returns (FindAllUpgradeNodesWithNodeClusterIdResponse);
|
2020-10-28 12:36:11 +08:00
|
|
|
|
|
2020-10-26 21:15:13 +08:00
|
|
|
|
// 读取节点安装状态
|
|
|
|
|
|
rpc findNodeInstallStatus (FindNodeInstallStatusRequest) returns (FindNodeInstallStatusResponse);
|
|
|
|
|
|
|
|
|
|
|
|
// 修改节点登录信息
|
2020-11-13 18:23:06 +08:00
|
|
|
|
rpc updateNodeLogin (UpdateNodeLoginRequest) returns (RPCSuccess);
|
2020-10-28 18:21:26 +08:00
|
|
|
|
|
|
|
|
|
|
// 计算某个节点分组内的节点数量
|
2020-12-10 15:03:08 +08:00
|
|
|
|
rpc countAllEnabledNodesWithNodeGroupId (CountAllEnabledNodesWithNodeGroupIdRequest) returns (RPCCountResponse);
|
2020-11-14 09:42:11 +08:00
|
|
|
|
|
2020-11-14 11:05:49 +08:00
|
|
|
|
// 取得某个集群下的所有节点DNS信息
|
2021-05-25 17:08:52 +08:00
|
|
|
|
rpc findAllEnabledNodesDNSWithNodeClusterId (FindAllEnabledNodesDNSWithNodeClusterIdRequest) returns (FindAllEnabledNodesDNSWithNodeClusterIdResponse);
|
2020-11-14 09:42:11 +08:00
|
|
|
|
|
|
|
|
|
|
// 查找单个节点的域名解析信息
|
|
|
|
|
|
rpc findEnabledNodeDNS (FindEnabledNodeDNSRequest) returns (FindEnabledNodeDNSResponse);
|
|
|
|
|
|
|
|
|
|
|
|
// 修改节点的DNS解析信息
|
|
|
|
|
|
rpc updateNodeDNS (UpdateNodeDNSRequest) returns (RPCSuccess);
|
2020-12-10 15:03:08 +08:00
|
|
|
|
|
|
|
|
|
|
// 计算某个区域下的节点数量
|
|
|
|
|
|
rpc countAllEnabledNodesWithNodeRegionId (CountAllEnabledNodesWithNodeRegionIdRequest) returns (RPCCountResponse);
|
2021-01-17 16:48:05 +08:00
|
|
|
|
|
|
|
|
|
|
// 根据一组ID获取节点信息
|
|
|
|
|
|
rpc findEnabledNodesWithIds (FindEnabledNodesWithIdsRequest) returns (FindEnabledNodesWithIdsResponse);
|
2021-01-31 11:05:41 +08:00
|
|
|
|
|
|
|
|
|
|
// 检查新版本
|
|
|
|
|
|
rpc checkNodeLatestVersion (CheckNodeLatestVersionRequest) returns (CheckNodeLatestVersionResponse);
|
2021-02-24 19:27:07 +08:00
|
|
|
|
|
|
|
|
|
|
// 设置节点上线状态
|
|
|
|
|
|
rpc updateNodeUp (UpdateNodeUpRequest) returns (RPCSuccess);
|
2021-06-10 19:19:30 +08:00
|
|
|
|
|
|
|
|
|
|
// 下载最新边缘节点安装文件
|
|
|
|
|
|
rpc downloadNodeInstallationFile (DownloadNodeInstallationFileRequest) returns (DownloadNodeInstallationFileResponse);
|
2020-09-13 19:27:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 创建节点
|
|
|
|
|
|
message CreateNodeRequest {
|
|
|
|
|
|
string name = 1;
|
2020-12-17 15:51:09 +08:00
|
|
|
|
int64 nodeClusterId = 2;
|
2021-05-25 17:08:52 +08:00
|
|
|
|
NodeLogin nodeLogin = 3;
|
|
|
|
|
|
int64 nodeGroupId = 4;
|
2021-07-31 22:23:16 +08:00
|
|
|
|
int64 dnsDomainId = 5 [deprecated = true];
|
2020-11-16 13:03:58 +08:00
|
|
|
|
repeated string dnsRoutes = 6;
|
2021-05-25 17:08:52 +08:00
|
|
|
|
int64 nodeRegionId = 7;
|
2020-09-13 19:27:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message CreateNodeResponse {
|
|
|
|
|
|
int64 nodeId = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-10-17 11:14:44 +08:00
|
|
|
|
// 注册集群节点
|
|
|
|
|
|
message RegisterClusterNodeRequest {
|
|
|
|
|
|
string name = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message RegisterClusterNodeResponse {
|
|
|
|
|
|
string uniqueId = 1;
|
|
|
|
|
|
string secret = 2;
|
|
|
|
|
|
repeated string endpoints = 3;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-05-26 14:40:21 +08:00
|
|
|
|
// 所有可用的节点数量
|
2020-09-13 19:27:47 +08:00
|
|
|
|
message CountAllEnabledNodesRequest {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 列出单页节点
|
|
|
|
|
|
message ListEnabledNodesMatchRequest {
|
|
|
|
|
|
int64 offset = 1;
|
|
|
|
|
|
int64 size = 2;
|
2020-12-17 15:51:09 +08:00
|
|
|
|
int64 nodeClusterId = 3;
|
2020-09-13 19:27:47 +08:00
|
|
|
|
int32 installState = 4;
|
2020-09-26 08:07:24 +08:00
|
|
|
|
int32 activeState = 5;
|
2020-10-28 18:21:26 +08:00
|
|
|
|
string keyword = 6;
|
2021-05-25 17:08:52 +08:00
|
|
|
|
int64 nodeGroupId = 7;
|
|
|
|
|
|
int64 nodeRegionId = 8;
|
2021-07-07 19:55:52 +08:00
|
|
|
|
|
|
|
|
|
|
bool cpuAsc = 20;
|
|
|
|
|
|
bool cpuDesc = 21;
|
|
|
|
|
|
bool memoryAsc = 22;
|
|
|
|
|
|
bool memoryDesc = 23;
|
|
|
|
|
|
bool trafficInAsc = 24;
|
|
|
|
|
|
bool trafficInDesc = 25;
|
|
|
|
|
|
bool trafficOutAsc = 26;
|
|
|
|
|
|
bool trafficOutDesc = 27;
|
2020-09-13 19:27:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message ListEnabledNodesMatchResponse {
|
|
|
|
|
|
repeated Node nodes = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-10-04 16:10:19 +08:00
|
|
|
|
// 根据集群查找所有节点
|
2021-05-25 17:08:52 +08:00
|
|
|
|
message FindAllEnabledNodesWithNodeClusterIdRequest {
|
2020-12-17 15:51:09 +08:00
|
|
|
|
int64 nodeClusterId = 1;
|
2020-10-04 16:10:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-05-25 17:08:52 +08:00
|
|
|
|
message FindAllEnabledNodesWithNodeClusterIdResponse {
|
2020-10-04 16:10:19 +08:00
|
|
|
|
repeated Node nodes = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-11-15 21:17:37 +08:00
|
|
|
|
// 删除节点
|
|
|
|
|
|
message DeleteNodeRequest {
|
2020-09-13 19:27:47 +08:00
|
|
|
|
int64 nodeId = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-07-31 22:23:16 +08:00
|
|
|
|
// 从集群中删除节点
|
|
|
|
|
|
message DeleteNodeFromNodeClusterRequest {
|
|
|
|
|
|
int64 nodeId = 1;
|
|
|
|
|
|
int64 nodeClusterId = 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-09-13 19:27:47 +08:00
|
|
|
|
// 修改节点
|
|
|
|
|
|
message UpdateNodeRequest {
|
|
|
|
|
|
int64 nodeId = 1;
|
|
|
|
|
|
string name = 2;
|
2020-12-17 15:51:09 +08:00
|
|
|
|
int64 nodeClusterId = 3;
|
2021-07-31 22:23:16 +08:00
|
|
|
|
repeated int64 secondaryNodeClusterIds = 13;
|
2021-05-25 17:08:52 +08:00
|
|
|
|
NodeLogin nodeLogin = 4;
|
2020-10-10 12:31:40 +08:00
|
|
|
|
int32 maxCPU = 5;
|
|
|
|
|
|
bool isOn = 6;
|
2021-05-25 17:08:52 +08:00
|
|
|
|
int64 nodeGroupId = 7;
|
2021-07-31 22:23:16 +08:00
|
|
|
|
int64 dnsDomainId = 8 [deprecated = true];
|
2020-11-16 13:03:58 +08:00
|
|
|
|
repeated string dnsRoutes = 9;
|
2021-05-25 17:08:52 +08:00
|
|
|
|
int64 nodeRegionId = 10;
|
2021-05-12 21:38:02 +08:00
|
|
|
|
SizeCapacity maxCacheDiskCapacity = 11;
|
|
|
|
|
|
SizeCapacity maxCacheMemoryCapacity = 12;
|
2020-09-13 19:27:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-05-26 14:40:21 +08:00
|
|
|
|
// 获取单个节点信息
|
2020-09-13 19:27:47 +08:00
|
|
|
|
message FindEnabledNodeRequest {
|
|
|
|
|
|
int64 nodeId = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message FindEnabledNodeResponse {
|
|
|
|
|
|
Node node = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-08-31 17:24:41 +08:00
|
|
|
|
// 获取单个节点基本信息
|
|
|
|
|
|
message FindEnabledBasicNodeRequest {
|
|
|
|
|
|
int64 nodeId = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message FindEnabledBasicNodeResponse {
|
|
|
|
|
|
BasicNode node = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-09-13 19:27:47 +08:00
|
|
|
|
// 组合单个节点配置
|
2020-11-02 22:14:28 +08:00
|
|
|
|
message FindCurrentNodeConfigRequest {
|
|
|
|
|
|
// 由于登录信息中已经包含了节点信息,所以这里不需要nodeId
|
2020-12-02 14:26:17 +08:00
|
|
|
|
int64 version = 1;
|
2020-09-13 19:27:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2020-11-02 22:14:28 +08:00
|
|
|
|
message FindCurrentNodeConfigResponse {
|
2020-09-21 19:52:10 +08:00
|
|
|
|
bytes nodeJSON = 1;
|
2020-12-02 14:26:17 +08:00
|
|
|
|
bool isChanged = 2;
|
2020-09-13 19:27:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 节点stream
|
2020-10-04 16:10:19 +08:00
|
|
|
|
message NodeStreamMessage {
|
|
|
|
|
|
int64 nodeId = 1;
|
|
|
|
|
|
int64 requestId = 2;
|
|
|
|
|
|
int32 timeoutSeconds = 3;
|
|
|
|
|
|
string code = 4;
|
|
|
|
|
|
bytes dataJSON = 5;
|
|
|
|
|
|
bool isOk = 6;
|
|
|
|
|
|
string message = 7;
|
2020-09-13 19:27:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 更新节点状态
|
|
|
|
|
|
message UpdateNodeStatusRequest {
|
|
|
|
|
|
int64 nodeId = 1;
|
|
|
|
|
|
bytes statusJSON = 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 计算匹配的节点数量
|
|
|
|
|
|
message CountAllEnabledNodesMatchRequest {
|
2020-12-17 15:51:09 +08:00
|
|
|
|
int64 nodeClusterId = 1;
|
2020-09-13 19:27:47 +08:00
|
|
|
|
int32 installState = 2;
|
2020-09-26 08:07:24 +08:00
|
|
|
|
int32 activeState = 3;
|
2020-10-28 18:21:26 +08:00
|
|
|
|
string keyword = 4;
|
2021-05-25 17:08:52 +08:00
|
|
|
|
int64 nodeGroupId = 5;
|
|
|
|
|
|
int64 nodeRegionId = 6;
|
2020-09-13 19:27:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 修改节点安装状态
|
|
|
|
|
|
message UpdateNodeIsInstalledRequest {
|
|
|
|
|
|
int64 nodeId = 1;
|
|
|
|
|
|
bool isInstalled = 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 安装节点
|
|
|
|
|
|
message InstallNodeRequest {
|
|
|
|
|
|
int64 nodeId = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message InstallNodeResponse {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2020-10-04 16:10:19 +08:00
|
|
|
|
|
2020-10-28 12:36:11 +08:00
|
|
|
|
// 升级节点
|
|
|
|
|
|
message UpgradeNodeRequest {
|
|
|
|
|
|
int64 nodeId = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message UpgradeNodeResponse {
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-10-27 12:33:18 +08:00
|
|
|
|
// 启动节点
|
|
|
|
|
|
message StartNodeRequest {
|
|
|
|
|
|
int64 nodeId = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message StartNodeResponse {
|
|
|
|
|
|
bool isOk = 1;
|
|
|
|
|
|
string error = 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 停止节点
|
|
|
|
|
|
message StopNodeRequest {
|
|
|
|
|
|
int64 nodeId = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message StopNodeResponse {
|
|
|
|
|
|
bool isOk = 1;
|
|
|
|
|
|
string error = 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-10-04 16:10:19 +08:00
|
|
|
|
// 更改节点连接的API节点信息
|
|
|
|
|
|
message UpdateNodeConnectedAPINodesRequest {
|
|
|
|
|
|
repeated int64 apiNodeIds = 1;
|
2020-10-25 21:27:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 计算使用某个认证的节点数量
|
2021-05-25 17:08:52 +08:00
|
|
|
|
message CountAllEnabledNodesWithNodeGrantIdRequest {
|
2021-05-25 17:49:05 +08:00
|
|
|
|
int64 nodeGrantId = 1;
|
2020-10-25 21:27:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 查找使用某个认证的所有节点
|
2021-05-25 17:08:52 +08:00
|
|
|
|
message FindAllEnabledNodesWithNodeGrantIdRequest {
|
2021-05-25 17:49:05 +08:00
|
|
|
|
int64 nodeGrantId = 1;
|
2020-10-25 21:27:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-05-25 17:08:52 +08:00
|
|
|
|
message FindAllEnabledNodesWithNodeGrantIdResponse {
|
2020-10-25 21:27:49 +08:00
|
|
|
|
repeated Node nodes = 1;
|
2020-10-26 21:15:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 列出所有未安装的节点
|
2021-05-25 17:08:52 +08:00
|
|
|
|
message FindAllNotInstalledNodesWithNodeClusterIdRequest {
|
2020-12-17 15:51:09 +08:00
|
|
|
|
int64 nodeClusterId = 1;
|
2020-10-26 21:15:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-05-25 17:08:52 +08:00
|
|
|
|
message FindAllNotInstalledNodesWithNodeClusterIdResponse {
|
2020-10-26 21:15:13 +08:00
|
|
|
|
repeated Node nodes = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-01-31 16:01:15 +08:00
|
|
|
|
// 计算未安装的节点数量
|
2021-05-25 17:08:52 +08:00
|
|
|
|
message CountAllNotInstalledNodesWithNodeClusterIdRequest {
|
2021-01-31 16:01:15 +08:00
|
|
|
|
int64 nodeClusterId = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-11-30 20:01:27 +08:00
|
|
|
|
// 计算需要升级的节点数量
|
2021-05-25 17:08:52 +08:00
|
|
|
|
message CountAllUpgradeNodesWithNodeClusterIdRequest {
|
2020-12-17 15:51:09 +08:00
|
|
|
|
int64 nodeClusterId = 1;
|
2020-11-30 20:01:27 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2020-10-28 12:36:11 +08:00
|
|
|
|
// 列出所有需要升级的节点
|
2021-05-25 17:08:52 +08:00
|
|
|
|
message FindAllUpgradeNodesWithNodeClusterIdRequest {
|
2020-12-17 15:51:09 +08:00
|
|
|
|
int64 nodeClusterId = 1;
|
2020-10-28 12:36:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-05-25 17:08:52 +08:00
|
|
|
|
message FindAllUpgradeNodesWithNodeClusterIdResponse {
|
2020-10-28 12:36:11 +08:00
|
|
|
|
repeated NodeUpgrade nodes = 1;
|
|
|
|
|
|
|
|
|
|
|
|
message NodeUpgrade {
|
|
|
|
|
|
Node node = 1;
|
|
|
|
|
|
string os = 2;
|
|
|
|
|
|
string arch = 3;
|
|
|
|
|
|
string oldVersion = 4;
|
|
|
|
|
|
string newVersion = 5;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-10-26 21:15:13 +08:00
|
|
|
|
// 读取节点安装状态
|
|
|
|
|
|
message FindNodeInstallStatusRequest {
|
|
|
|
|
|
int64 nodeId = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message FindNodeInstallStatusResponse {
|
|
|
|
|
|
NodeInstallStatus installStatus = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 修改节点登录信息
|
|
|
|
|
|
message UpdateNodeLoginRequest {
|
|
|
|
|
|
int64 nodeId = 1;
|
2021-05-25 17:08:52 +08:00
|
|
|
|
NodeLogin nodeLogin = 2;
|
2020-10-26 21:15:13 +08:00
|
|
|
|
}
|
2020-10-28 18:21:26 +08:00
|
|
|
|
|
|
|
|
|
|
// 计算某个节点分组内的节点数量
|
2020-12-10 15:03:08 +08:00
|
|
|
|
message CountAllEnabledNodesWithNodeGroupIdRequest {
|
|
|
|
|
|
int64 nodeGroupId = 1;
|
2020-10-28 18:21:26 +08:00
|
|
|
|
}
|
2020-11-14 09:42:11 +08:00
|
|
|
|
|
|
|
|
|
|
// 取得某个集群下的所有节点
|
2021-05-25 17:08:52 +08:00
|
|
|
|
message FindAllEnabledNodesDNSWithNodeClusterIdRequest {
|
2020-11-14 09:42:11 +08:00
|
|
|
|
int64 nodeClusterId = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-05-25 17:08:52 +08:00
|
|
|
|
message FindAllEnabledNodesDNSWithNodeClusterIdResponse {
|
2020-11-14 09:42:11 +08:00
|
|
|
|
repeated NodeDNSInfo nodes = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message NodeDNSInfo {
|
|
|
|
|
|
int64 id = 1;
|
|
|
|
|
|
string name = 2;
|
|
|
|
|
|
string ipAddr = 3;
|
2020-11-16 13:03:58 +08:00
|
|
|
|
repeated DNSRoute routes = 4;
|
2020-12-17 15:51:09 +08:00
|
|
|
|
int64 nodeClusterId = 5;
|
2020-11-14 09:42:11 +08:00
|
|
|
|
int64 dnsDomainId = 6;
|
2020-11-14 21:28:02 +08:00
|
|
|
|
string dnsDomainName = 7;
|
2020-12-23 19:45:22 +08:00
|
|
|
|
string nodeClusterDNSName = 8;
|
2020-11-14 09:42:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 查找单个节点的域名解析信息
|
|
|
|
|
|
message FindEnabledNodeDNSRequest {
|
|
|
|
|
|
int64 nodeId = 1;
|
2021-07-31 22:23:16 +08:00
|
|
|
|
int64 nodeClusterId = 2;
|
2020-11-14 09:42:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message FindEnabledNodeDNSResponse {
|
|
|
|
|
|
NodeDNSInfo node = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 修改节点的DNS信息
|
|
|
|
|
|
message UpdateNodeDNSRequest {
|
|
|
|
|
|
int64 nodeId = 1;
|
|
|
|
|
|
string ipAddr = 2;
|
|
|
|
|
|
int64 dnsDomainId = 3;
|
2020-11-16 13:03:58 +08:00
|
|
|
|
repeated string routes = 4;
|
2020-11-14 09:42:11 +08:00
|
|
|
|
}
|
2020-12-10 15:03:08 +08:00
|
|
|
|
|
|
|
|
|
|
// 计算某个区域下的节点数量
|
|
|
|
|
|
message CountAllEnabledNodesWithNodeRegionIdRequest {
|
|
|
|
|
|
int64 nodeRegionId = 1;
|
2021-01-17 16:48:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 根据一组ID获取节点信息
|
|
|
|
|
|
message FindEnabledNodesWithIdsRequest {
|
|
|
|
|
|
repeated int64 nodeIds = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message FindEnabledNodesWithIdsResponse {
|
|
|
|
|
|
repeated Node nodes = 1;
|
2021-01-31 11:05:41 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 检查新版本
|
|
|
|
|
|
message CheckNodeLatestVersionRequest {
|
|
|
|
|
|
string os = 1;
|
|
|
|
|
|
string arch = 2;
|
|
|
|
|
|
string currentVersion = 3;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message CheckNodeLatestVersionResponse {
|
|
|
|
|
|
bool hasNewVersion = 1;
|
|
|
|
|
|
string newVersion = 2;
|
2021-02-24 19:27:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 设置节点上线状态
|
|
|
|
|
|
message UpdateNodeUpRequest {
|
|
|
|
|
|
int64 nodeId = 1;
|
|
|
|
|
|
bool isUp = 2;
|
2021-06-10 19:19:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 下载最新边缘节点安装文件
|
|
|
|
|
|
message DownloadNodeInstallationFileRequest {
|
|
|
|
|
|
string os = 1;
|
|
|
|
|
|
string arch = 2;
|
|
|
|
|
|
int64 chunkOffset = 3;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message DownloadNodeInstallationFileResponse {
|
|
|
|
|
|
bytes chunkData = 1;
|
|
|
|
|
|
string sum = 2; // 文件的md5sum
|
|
|
|
|
|
int64 offset = 3;
|
|
|
|
|
|
string version = 4;
|
|
|
|
|
|
string filename = 5;
|
|
|
|
|
|
}
|