mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2026-02-28 01:37:06 +08:00
实现节点自动切换到备用IP
This commit is contained in:
@@ -234,3 +234,11 @@ func (this *NodeIPAddressThresholdDAO) formatThreshold(tx *dbs.Tx, threshold *No
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ExistsEnabledThreshold 检查阈值是否可以使用
|
||||
func (this *NodeIPAddressThresholdDAO) ExistsEnabledThreshold(tx *dbs.Tx, thresholdId int64) (bool, error) {
|
||||
return this.Query(tx).
|
||||
Pk(thresholdId).
|
||||
State(NodeIPAddressThresholdStateEnabled).
|
||||
Exist()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user