MCPcopy
hub / github.com/wavetermdev/waveterm / unbindRoute

Method unbindRoute

pkg/wshutil/wshrouter.go:751–765  ·  view source on GitHub ↗
(linkId baseds.LinkId, routeId string)

Source from the content-addressed store, hash-verified

749}
750
751func (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
767func (router *WshRouter) bindRouteLocally(linkId baseds.LinkId, routeId string, isSourceRoute bool) error {
768 if linkId == baseds.NoLinkId {

Callers 2

UnregisterLinkMethod · 0.95

Calls 6

unbindRouteLocallyMethod · 0.95
getLinkMetaMethod · 0.95
unannounceUpstreamMethod · 0.95
IsRootRouterMethod · 0.95
unsubscribeFromBrokerMethod · 0.95
NameMethod · 0.45

Tested by

no test coverage detected