mirror of
https://github.com/gravitl/netmaker.git
synced 2026-04-22 16:07:11 +08:00
49e28e3385
* add host node update action * add peer signal action to fallback api * add replace peers to host pull * add delete host action to fallback api * update base go builder image * update go builder tag * check host port to avoid conflicts behind NAT * fix connect/disconnect on api * send pull signal on disconnect from UI * fix panic on host join via user auth * reset failover on disconnect
19 lines
471 B
Go
19 lines
471 B
Go
package logic
|
|
|
|
import (
|
|
"github.com/gravitl/netmaker/models"
|
|
)
|
|
|
|
// IfaceDelta - checks if the new node causes an interface change
|
|
func IfaceDelta(currentNode *models.Node, newNode *models.Node) bool {
|
|
// single comparison statements
|
|
if newNode.Address.String() != currentNode.Address.String() ||
|
|
newNode.Address6.String() != currentNode.Address6.String() ||
|
|
newNode.Connected != currentNode.Connected {
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
// == Private Functions ==
|