商业版支持L2节点

This commit is contained in:
GoEdgeLab
2022-04-04 12:08:08 +08:00
parent 774a9875db
commit c809a73196
10 changed files with 305 additions and 28 deletions

View File

@@ -96,3 +96,15 @@ func (this *Node) DecodeSecondaryClusterIds() []int64 {
_ = json.Unmarshal(this.SecondaryClusterIds, &result)
return result
}
func (this *Node) AllClusterIds() []int64 {
var result = []int64{}
if this.ClusterId > 0 {
result = append(result, int64(this.ClusterId))
}
result = append(result, this.DecodeSecondaryClusterIds()...)
return result
}