阶段性提交

This commit is contained in:
刘祥超
2021-06-27 22:00:02 +08:00
parent be404ea98d
commit e4b59c5e85
20 changed files with 3344 additions and 398 deletions

View File

@@ -7,11 +7,12 @@ import (
var SharedNodeClusterDAO = new(NodeClusterDAO)
// NodeClusterDAO 集群相关操作
type NodeClusterDAO struct {
BaseDAO
}
// 查找集群
// FindEnabledNodeCluster 查找集群
func (this *NodeClusterDAO) FindEnabledNodeCluster(ctx context.Context, clusterId int64) (*pb.NodeCluster, error) {
clusterResp, err := this.RPC().NodeClusterRPC().FindEnabledNodeCluster(ctx, &pb.FindEnabledNodeClusterRequest{NodeClusterId: clusterId})
if err != nil {
@@ -19,3 +20,8 @@ func (this *NodeClusterDAO) FindEnabledNodeCluster(ctx context.Context, clusterI
}
return clusterResp.NodeCluster, nil
}
// FindEnabledNodeClusterConfigInfo 查找集群概要信息
func (this *NodeClusterDAO) FindEnabledNodeClusterConfigInfo(ctx context.Context, clusterId int64) (*pb.FindEnabledNodeClusterConfigInfoResponse, error) {
return this.RPC().NodeClusterRPC().FindEnabledNodeClusterConfigInfo(ctx, &pb.FindEnabledNodeClusterConfigInfoRequest{NodeClusterId: clusterId})
}