(linkId baseds.LinkId, routeId string, isSourceRoute bool)
| 798 | } |
| 799 | |
| 800 | func (router *WshRouter) bindRoute(linkId baseds.LinkId, routeId string, isSourceRoute bool) error { |
| 801 | err := router.bindRouteLocally(linkId, routeId, isSourceRoute) |
| 802 | if err != nil { |
| 803 | return err |
| 804 | } |
| 805 | lm := router.getLinkMeta(linkId) |
| 806 | if lm != nil { |
| 807 | log.Printf("wshrouter bind route %q to %s", routeId, lm.Name()) |
| 808 | } |
| 809 | // don't announce control routes upstream (they are local only) |
| 810 | if !strings.HasPrefix(routeId, ControlPrefix) { |
| 811 | router.announceUpstream(routeId) |
| 812 | } |
| 813 | if router.IsRootRouter() { |
| 814 | router.publishRouteToBroker(routeId) |
| 815 | } |
| 816 | return nil |
| 817 | } |
| 818 | |
| 819 | func (router *WshRouter) getUpstreamClient() (baseds.LinkId, AbstractRpcClient) { |
| 820 | router.lock.Lock() |
no test coverage detected