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

Method registerControlPlane

pkg/wshutil/wshrouter.go:665–681  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

663}
664
665func (router *WshRouter) registerControlPlane() {
666 controlImpl := &WshRouterControlImpl{Router: router}
667 controlRpcCtx := wshrpc.RpcContext{RouteId: ControlRoute}
668 router.controlRpc = MakeWshRpc(controlRpcCtx, controlImpl, "control")
669
670 linkId := router.RegisterUntrustedLink(router.controlRpc)
671 router.trustLink(linkId, LinkKind_Leaf)
672
673 router.lock.Lock()
674 defer router.lock.Unlock()
675 lm := router.linkMap[linkId]
676 if lm != nil {
677 lm.sourceRouteId = ControlRoute
678 router.routeMap[ControlRoute] = linkId
679 log.Printf("wshrouter registered control route %q linkid=%d", ControlRoute, linkId)
680 }
681}
682
683func (router *WshRouter) announceUpstream(routeId string) {
684 msg := RpcMessage{

Callers 1

NewWshRouterFunction · 0.95

Calls 3

RegisterUntrustedLinkMethod · 0.95
trustLinkMethod · 0.95
MakeWshRpcFunction · 0.85

Tested by

no test coverage detected