synchronized, returns a copy
(routeId string)
| 607 | |
| 608 | // synchronized, returns a copy |
| 609 | func (router *WshRouter) getLinkForRoute(routeId string) *linkMeta { |
| 610 | if routeId == "" { |
| 611 | return nil |
| 612 | } |
| 613 | router.lock.Lock() |
| 614 | defer router.lock.Unlock() |
| 615 | linkId := router.routeMap[routeId] |
| 616 | if linkId == baseds.NoLinkId { |
| 617 | return nil |
| 618 | } |
| 619 | lm := router.linkMap[linkId] |
| 620 | if lm == nil { |
| 621 | return nil |
| 622 | } |
| 623 | lmCopy := *lm |
| 624 | return &lmCopy |
| 625 | } |
| 626 | |
| 627 | func (router *WshRouter) GetLinkIdForRoute(routeId string) baseds.LinkId { |
| 628 | lm := router.getLinkForRoute(routeId) |
no outgoing calls
no test coverage detected