mirror of
https://github.com/gravitl/netmaker.git
synced 2024-09-20 15:26:04 +08:00
add ext peers field to host update
This commit is contained in:
parent
e670cb04a1
commit
f2d8cf4fb6
|
@ -412,6 +412,7 @@ func GetPeerUpdateForHost(host *models.Host) (models.HostPeerUpdate, error) {
|
|||
extPeers, extPeerIDAndAddrs, err := getExtPeers(&node)
|
||||
if err == nil {
|
||||
hostPeerUpdate.Peers = append(hostPeerUpdate.Peers, extPeers...)
|
||||
hostPeerUpdate.ExtPeers = extPeers
|
||||
for _, extPeerIdAndAddr := range extPeerIDAndAddrs {
|
||||
hostPeerUpdate.PeerIDs[extPeerIdAndAddr.ID] = make(map[string]models.IDandAddr)
|
||||
hostPeerUpdate.PeerIDs[extPeerIdAndAddr.ID][extPeerIdAndAddr.ID] = models.IDandAddr{
|
||||
|
|
|
@ -25,6 +25,7 @@ type HostPeerUpdate struct {
|
|||
Peers []wgtypes.PeerConfig `json:"peers" bson:"peers" yaml:"peers"`
|
||||
PeerIDs HostPeerMap `json:"peerids" bson:"peerids" yaml:"peerids"`
|
||||
ProxyUpdate proxy_models.ProxyManagerPayload `json:"proxy_update" bson:"proxy_update" yaml:"proxy_update"`
|
||||
ExtPeers []wgtypes.PeerConfig `json:"ext_peers" bson:"ext_peers" yaml:"ext_peers"`
|
||||
}
|
||||
|
||||
// NetworkInfo - struct for network info
|
||||
|
|
Loading…
Reference in a new issue