func GetAllAppMeshNodeConnections(meshname *string, svc *appmesh.Client) []AppMeshVirtualNode {
	services := GetAllAppMeshPaths(meshname, svc)
	var nodelist []AppMeshVirtualNode
	servicelist := make(map[string]AppMeshVirtualService)
	for _, service := range services {
		for _, path := range service.VirtualServiceRoutes {
			destinationNode := path.DestinationNode
			backends := getAppMeshVirtualNodeBackendServices2(meshname, &destinationNode, svc)
			if len(backends) == 0 {
				pathDetails := AppMeshVirtualServicePath{
					VirtualNode: destinationNode,
				}
				service.AddPath(pathDetails)
			} else {
				for _, backend := range backends {
					pathDetails := AppMeshVirtualServicePath{
						VirtualNode: destinationNode,
						ServiceName: backend,
					}
					service.AddPath(pathDetails)
				}
			}
		}
		servicelist[service.VirtualServiceName] = service
	}
	nodes := getAllAppMeshNodes(meshname, svc)
	for _, node := range nodes {
		connectedServices := getAppMeshVirtualNodeBackendServices2(meshname, node.VirtualNodeName, svc)
		var backendNodes []string
		for _, service := range connectedServices {
			connectedservice := servicelist[service]
			for _, path := range connectedservice.VirtualServicePaths {
				backendNodes = append(backendNodes, path.VirtualNode)
			}
		}
		nodeinfo := AppMeshVirtualNode{
			VirtualNodeName: aws.ToString(node.VirtualNodeName),
			BackendServices: connectedServices,
			BackendNodes:    backendNodes,
		}
		nodelist = append(nodelist, nodeinfo)
	}
	return nodelist
}
// GetAllAppMeshNodeConnections retrieves all nodes and which services/nodes they connect to
GetAllAppMeshNodeConnections retrieves all nodes and which services/nodes they connect to
// GetAllAppMeshNodeConnections retrieves all nodes and which services / nodes they connect to
func GetAllAppMeshNodeConnections(meshname *string, svc *appmesh.Client) []AppMeshVirtualNode {
	services := GetAllAppMeshPaths(meshname, svc)
	var nodelist []AppMeshVirtualNode
	servicelist := make(map[string]AppMeshVirtualService)
	for _, service := range services {
		for _, path := range service.VirtualServiceRoutes {
			destinationNode := path.DestinationNode
			backends := getAppMeshVirtualNodeBackendServices2(meshname, &destinationNode, svc)
			if len(backends) == 0 {
				pathDetails := AppMeshVirtualServicePath{
					VirtualNode: destinationNode,
				}
				service.AddPath(pathDetails)
			} else {
				for _, backend := range backends {
					pathDetails := AppMeshVirtualServicePath{
						VirtualNode: destinationNode,
						ServiceName: backend,
					}
					service.AddPath(pathDetails)
				}
			}
		}
		servicelist[service.VirtualServiceName] = service
	}
	nodes := getAllAppMeshNodes(meshname, svc)
	for _, node := range nodes {
		connectedServices := getAppMeshVirtualNodeBackendServices2(meshname, node.VirtualNodeName, svc)
		var backendNodes []string
		for _, service := range connectedServices {
			connectedservice := servicelist[service]
			for _, path := range connectedservice.VirtualServicePaths {
				backendNodes = append(backendNodes, path.VirtualNode)
			}
		}
		nodeinfo := AppMeshVirtualNode{
			VirtualNodeName: aws.ToString(node.VirtualNodeName),
			BackendServices: connectedServices,
			BackendNodes:    backendNodes,
		}
		nodelist = append(nodelist, nodeinfo)
	}
	return nodelist
}
func GetAllAppMeshNodeConnections ( meshname * string , svc * appmesh . Client ) [ ] AppMeshVirtualNode { services := GetAllAppMeshPaths ( meshname , svc ) var nodelist [ ] AppMeshVirtualNode servicelist := make ( map [ string ] AppMeshVirtualService ) for _ , service := range services { for _ , path := range service . VirtualServiceRoutes { destinationNode := path . DestinationNode backends := getAppMeshVirtualNodeBackendServices2 ( meshname , & destinationNode , svc ) if len ( backends ) == 0 { pathDetails := AppMeshVirtualServicePath { VirtualNode : destinationNode , } service . AddPath ( pathDetails ) } else { for _ , backend := range backends { pathDetails := AppMeshVirtualServicePath { VirtualNode : destinationNode , ServiceName : backend , } service . AddPath ( pathDetails ) } } } servicelist [ service . VirtualServiceName ] = service } nodes := getAllAppMeshNodes ( meshname , svc ) for _ , node := range nodes { connectedServices := getAppMeshVirtualNodeBackendServices2 ( meshname , node . VirtualNodeName , svc ) var backendNodes [ ] string for _ , service := range connectedServices { connectedservice := servicelist [ service ] for _ , path := range connectedservice . VirtualServicePaths { backendNodes = append ( backendNodes , path . VirtualNode ) } } nodeinfo := AppMeshVirtualNode { VirtualNodeName : aws . ToString ( node . VirtualNodeName ) , BackendServices : connectedServices , BackendNodes : backendNodes , } nodelist = append ( nodelist , nodeinfo ) } return nodelist }
GetAllAppMeshNodeConnections retrieves all nodes and which services/nodes they connect to
GetAllAppMeshNodeConnections retrieves all nodes and which services / nodes they connect to