(linkId baseds.LinkId, routeId string)
| 749 | } |
| 750 | |
| 751 | func (router *WshRouter) unbindRoute(linkId baseds.LinkId, routeId string) error { |
| 752 | err := router.unbindRouteLocally(linkId, routeId) |
| 753 | if err != nil { |
| 754 | return err |
| 755 | } |
| 756 | lm := router.getLinkMeta(linkId) |
| 757 | if lm != nil { |
| 758 | log.Printf("wshrouter unbind route %q from %s", routeId, lm.Name()) |
| 759 | } |
| 760 | router.unannounceUpstream(routeId) |
| 761 | if router.IsRootRouter() { |
| 762 | router.unsubscribeFromBroker(routeId) |
| 763 | } |
| 764 | return nil |
| 765 | } |
| 766 | |
| 767 | func (router *WshRouter) bindRouteLocally(linkId baseds.LinkId, routeId string, isSourceRoute bool) error { |
| 768 | if linkId == baseds.NoLinkId { |
no test coverage detected