mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-12 14:50:25 +08:00
可以在集群中查看待安装节点、并直接安装节点
This commit is contained in:
@@ -171,6 +171,19 @@ func (this *APINodeDAO) FindAllEnabledAPINodes() (result []*APINode, err error)
|
||||
return
|
||||
}
|
||||
|
||||
// 列出所有可用而且启用的API节点
|
||||
func (this *APINodeDAO) FindAllEnabledAndOnAPINodes() (result []*APINode, err error) {
|
||||
_, err = this.Query().
|
||||
Attr("clusterId", 0). // 非集群专用
|
||||
Attr("isOn", true).
|
||||
State(APINodeStateEnabled).
|
||||
Desc("order").
|
||||
AscPk().
|
||||
Slice(&result).
|
||||
FindAll()
|
||||
return
|
||||
}
|
||||
|
||||
// 计算API节点数量
|
||||
func (this *APINodeDAO) CountAllEnabledAPINodes() (int64, error) {
|
||||
return this.Query().
|
||||
|
||||
Reference in New Issue
Block a user