阶段性提交

This commit is contained in:
GoEdgeLab
2020-12-23 10:30:42 +08:00
parent 589cde7511
commit 21159b97db
18 changed files with 2115 additions and 770 deletions

View File

@@ -0,0 +1,21 @@
package dao
import (
"context"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
)
var SharedNodeClusterDAO = new(NodeClusterDAO)
type NodeClusterDAO struct {
BaseDAO
}
// 查找集群
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 {
return nil, err
}
return clusterResp.NodeCluster, nil
}