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

Method RegisterUpstream

pkg/wshutil/wshrouter.go:653–663  ·  view source on GitHub ↗
(rpc AbstractRpcClient)

Source from the content-addressed store, hash-verified

651}
652
653func (router *WshRouter) RegisterUpstream(rpc AbstractRpcClient) baseds.LinkId {
654 if router.IsRootRouter() {
655 panic("cannot register upstream for root router")
656 }
657 linkId := router.RegisterUntrustedLink(rpc)
658 router.trustLink(linkId, LinkKind_Router)
659 router.lock.Lock()
660 defer router.lock.Unlock()
661 router.upstreamLinkId = linkId
662 return linkId
663}
664
665func (router *WshRouter) registerControlPlane() {
666 controlImpl := &WshRouterControlImpl{Router: router}

Callers 2

serverRunRouterFunction · 0.95

Calls 3

IsRootRouterMethod · 0.95
RegisterUntrustedLinkMethod · 0.95
trustLinkMethod · 0.95

Tested by

no test coverage detected