mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-24 06:34:42 +08:00
新增通过nodeid获取nodename接口
This commit is contained in:
@@ -156,3 +156,12 @@ func IsExistsNode(nodelist []CNode, pNode *CNode) bool {
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func (slf *ClusterConfig) GetNodeNameByNodeId(nodeid int) string {
|
||||
node, ok := slf.mapIdNode[nodeid]
|
||||
if ok == false {
|
||||
return ""
|
||||
}
|
||||
|
||||
return node.NodeName
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user