可以在集群中查看待安装节点、并直接安装节点

This commit is contained in:
刘祥超
2020-10-26 21:14:56 +08:00
parent 5869ad30ae
commit 60ceac7fad
11 changed files with 246 additions and 15 deletions

View File

@@ -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().