MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / bindRoute

Method bindRoute

pkg/wshutil/wshrouter.go:800–817  ·  view source on GitHub ↗
(linkId baseds.LinkId, routeId string, isSourceRoute bool)

Source from the content-addressed store, hash-verified

798}
799
800func (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
819func (router *WshRouter) getUpstreamClient() (baseds.LinkId, AbstractRpcClient) {
820 router.lock.Lock()

Callers 5

RegisterTrustedLeafMethod · 0.95
RouteAnnounceCommandMethod · 0.80
AuthenticateCommandMethod · 0.80

Calls 6

bindRouteLocallyMethod · 0.95
getLinkMetaMethod · 0.95
announceUpstreamMethod · 0.95
IsRootRouterMethod · 0.95
publishRouteToBrokerMethod · 0.95
NameMethod · 0.45

Tested by

no test coverage detected