From 023f29ee71bc51f149cbcbf16b039e8867b345e1 Mon Sep 17 00:00:00 2001 From: Abhishek Kondur Date: Fri, 6 Jan 2023 21:27:40 +0530 Subject: [PATCH] pr comments --- models/metrics.go | 1 + mq/publishers.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/models/metrics.go b/models/metrics.go index 7015c180..5227520e 100644 --- a/models/metrics.go +++ b/models/metrics.go @@ -43,6 +43,7 @@ type IDandAddr struct { // PeerMap - peer map for ids and addresses in metrics type PeerMap map[string]IDandAddr +// HostPeerMap - host peer map for ids and addresses type HostPeerMap map[string]map[string]IDandAddr // MetricsMap - map for holding multiple metrics in memory diff --git a/mq/publishers.go b/mq/publishers.go index ef981523..78cc86a4 100644 --- a/mq/publishers.go +++ b/mq/publishers.go @@ -14,7 +14,7 @@ import ( "github.com/gravitl/netmaker/serverctl" ) -// PublishPeerUpdate --- deterines and publishes a peer update to all the peers of a node +// PublishPeerUpdate --- determines and publishes a peer update to all the hosts func PublishPeerUpdate(network string, publishToSelf bool) error { if !servercfg.IsMessageQueueBackend() { return nil @@ -48,7 +48,7 @@ func PublishProxyPeerUpdate(node *models.Node) error { return nil } -// PublishSinglePeerUpdate --- determines and publishes a peer update to one node +// PublishSingleHostUpdate --- determines and publishes a peer update to one host func PublishSingleHostUpdate(host *models.Host) error { peerUpdate, err := logic.GetPeerUpdateForHost(host)