()
| 663 | } |
| 664 | |
| 665 | func (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 | |
| 683 | func (router *WshRouter) announceUpstream(routeId string) { |
| 684 | msg := RpcMessage{ |
no test coverage detected