[API节点]列表显示版本号、CPU、内存、状态等信息

This commit is contained in:
刘祥超
2020-12-29 18:28:07 +08:00
parent 0e50b03cf7
commit 4147e0d8bc
14 changed files with 504 additions and 4 deletions

View File

@@ -232,6 +232,15 @@ func (this *APINodeDAO) FindEnabledAPINodeIdWithAddr(protocol string, host strin
return int64(one.(*APINode).Id), nil
}
// 设置API节点状态
func (this *APINodeDAO) UpdateAPINodeStatus(apiNodeId int64, statusJSON []byte) error {
_, err := this.Query().
Pk(apiNodeId).
Set("status", statusJSON).
Update()
return err
}
// 生成唯一ID
func (this *APINodeDAO) genUniqueId() (string, error) {
for {