mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2026-02-21 20:35:38 +08:00
[区域]增加区域管理
This commit is contained in:
@@ -618,6 +618,14 @@ func (this *NodeDAO) CountAllEnabledNodesWithGroupId(groupId int64) (int64, erro
|
||||
Count()
|
||||
}
|
||||
|
||||
// 查找某个节点区域下的所有节点数量
|
||||
func (this *NodeDAO) CountAllEnabledNodesWithRegionId(regionId int64) (int64, error) {
|
||||
return this.Query().
|
||||
State(NodeStateEnabled).
|
||||
Attr("regionId", regionId).
|
||||
Count()
|
||||
}
|
||||
|
||||
// 获取一个集群的节点DNS信息
|
||||
func (this *NodeDAO) FindAllEnabledNodesDNSWithClusterId(clusterId int64) (result []*Node, err error) {
|
||||
_, err = this.Query().
|
||||
|
||||
Reference in New Issue
Block a user