mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-03 23:20:26 +08:00
EdgeDNS:访问日志增加集群和记录类型筛选
This commit is contained in:
@@ -609,6 +609,26 @@ func (this *NSNodeDAO) UpdateNodeInstallStatus(tx *dbs.Tx, nodeId int64, status
|
||||
return err
|
||||
}
|
||||
|
||||
// FindEnabledNodeIdsWithClusterId 查找集群下的所有节点
|
||||
func (this *NSNodeDAO) FindEnabledNodeIdsWithClusterId(tx *dbs.Tx, clusterId int64) ([]int64, error) {
|
||||
if clusterId <= 0 {
|
||||
return nil, nil
|
||||
}
|
||||
ones, err := this.Query(tx).
|
||||
ResultPk().
|
||||
Attr("clusterId", clusterId).
|
||||
State(NSNodeStateEnabled).
|
||||
FindAll()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var result = []int64{}
|
||||
for _, one := range ones {
|
||||
result = append(result, int64(one.(*NSNode).Id))
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
// NotifyUpdate 通知更新
|
||||
func (this *NSNodeDAO) NotifyUpdate(tx *dbs.Tx, nodeId int64) error {
|
||||
// TODO 先什么都不做
|
||||
|
||||
Reference in New Issue
Block a user