mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-02 17:50:39 +00:00
Having 6 lists of topolgies in the same file is a bit much: 1. consts for topology names 2. Report type definition 3. MakeReport() Report initialisation 4. Report.Topology(name) lookup 5. Report.TopologyMap() mapping of names to topology references 6. Report.WalkPairedTopologies() iterator over topology references We get rid of 5 and 6 by introducing a topologyNames slice. So we are down to 5. We replace Report.TopologyMap() with a new function, WalkNamedTopologies, that uses topologyNames. WalkPairedTopologies() is updated to operate in a similar fashion. Likewise for WalkTopologies() and Topologies() - these were previously calling Walk[Paired]Topologies, but it is clearer to simply implement them directly.