tiny refactor: swap ConnectionJoin arg order

to match the style of other render HoFs, which take their inputs last.
This commit is contained in:
Matthias Radestock
2017-07-13 14:23:46 +01:00
parent e603a28ca4
commit 387a68a3c7
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -39,7 +39,7 @@ var ContainerRenderer = MakeFilter(
// This mapper brings in connections by joining with container
// IPs.
ConnectionJoin(SelectContainer, MapContainer2IP),
ConnectionJoin(MapContainer2IP, SelectContainer),
SelectContainer,
),
@@ -53,7 +53,7 @@ const originalNodeTopology = "original_node_topology"
// ConnectionJoin joins the given renderer with connections from the
// endpoints topology, using the toIPs function to extract IPs from
// the nodes.
func ConnectionJoin(r Renderer, toIPs func(report.Node) []string) Renderer {
func ConnectionJoin(toIPs func(report.Node) []string, r Renderer) Renderer {
nodeToIP := func(n report.Node, _ report.Networks) report.Nodes {
result := report.Nodes{}
for _, ip := range toIPs(n) {
+1 -1
View File
@@ -49,7 +49,7 @@ var PodRenderer = ConditionalRenderer(renderKubernetesTopologies,
),
),
selectPodsWithDeployments{},
ConnectionJoin(SelectPod, MapPod2IP),
ConnectionJoin(MapPod2IP, SelectPod),
),
),
)