From ebcf9dcf1057810f5ce82c3093bc38ae89245dec Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sat, 3 Jun 2017 10:46:52 +0100 Subject: [PATCH] refactor: rename ShortLivedConnectionJoin to ConnectionJoin since it's dealing with *all* connections, not just short-lived ones. --- render/container.go | 16 ++++++++-------- render/pod.go | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/render/container.go b/render/container.go index 0a3401fb9..ffdb1ea3e 100644 --- a/render/container.go +++ b/render/container.go @@ -34,11 +34,11 @@ var ContainerRenderer = MakeFilter( ProcessRenderer, ), - // This mapper brings in short lived connections by joining with container IPs. - // We need to be careful to ensure we only include each edge once. Edges brought in - // by the above renders will have a pid, so its enough to filter out any nodes with - // pids. - ShortLivedConnectionJoin(SelectContainer, MapContainer2IP), + // This mapper brings in connections by joining with container + // IPs. We need to be careful to ensure we only include each + // edge once. Edges brought in by the above renders will have + // a pid, so its enough to filter out any nodes with pids. + ConnectionJoin(SelectContainer, MapContainer2IP), SelectContainer, ), @@ -55,10 +55,10 @@ var mapEndpoint2IP = MakeMap( const originalNodeID = "original_node_id" const originalNodeTopology = "original_node_topology" -// ShortLivedConnectionJoin joins the given renderer with short lived connections -// from the endpoints topology, using the toIPs function to extract IPs from +// ConnectionJoin joins the given renderer with connections from the +// endpoints topology, using the toIPs function to extract IPs from // the nodes. -func ShortLivedConnectionJoin(r Renderer, toIPs func(report.Node) []string) Renderer { +func ConnectionJoin(r Renderer, toIPs func(report.Node) []string) Renderer { nodeToIP := func(n report.Node, _ report.Networks) report.Nodes { result := report.Nodes{} for _, ip := range toIPs(n) { diff --git a/render/pod.go b/render/pod.go index 8cbf73723..442d30e0b 100644 --- a/render/pod.go +++ b/render/pod.go @@ -44,7 +44,7 @@ var PodRenderer = ConditionalRenderer(renderKubernetesTopologies, ContainerWithImageNameRenderer, ), ), - ShortLivedConnectionJoin(SelectPod, MapPod2IP), + ConnectionJoin(SelectPod, MapPod2IP), SelectPod, ), ),