feat: adding traefik and proxy component to getting-started

This commit is contained in:
Diego Noguês
2026-02-11 15:34:18 +01:00
parent 5f43449f67
commit b81837a364
6 changed files with 589 additions and 29 deletions

View File

@@ -185,16 +185,17 @@ func (s *ProxyServiceServer) GetMappingUpdate(req *proto.GetMappingUpdateRequest
}
s.connectedProxies.Store(proxyID, conn)
s.addToCluster(conn.address, proxyID)
clusterAddr := extractClusterAddr(conn.address)
s.addToCluster(clusterAddr, proxyID)
log.WithFields(log.Fields{
"proxy_id": proxyID,
"address": proxyAddress,
"cluster_addr": extractClusterAddr(proxyAddress),
"cluster_addr": clusterAddr,
"total_proxies": len(s.GetConnectedProxies()),
}).Info("Proxy registered in cluster")
defer func() {
s.connectedProxies.Delete(proxyID)
s.removeFromCluster(conn.address, proxyID)
s.removeFromCluster(clusterAddr, proxyID)
cancel()
log.Infof("Proxy %s disconnected", proxyID)
}()