| 87 | } |
| 88 | |
| 89 | type WshRouter struct { |
| 90 | lock *sync.Mutex |
| 91 | isRootRouter bool |
| 92 | nextLinkId baseds.LinkId |
| 93 | upstreamLinkId baseds.LinkId |
| 94 | inputCh chan baseds.RpcInputChType |
| 95 | rpcMap map[string]rpcRoutingInfo // rpcid => routeinfo |
| 96 | routeMap map[string]baseds.LinkId // routeid => linkid |
| 97 | linkMap map[baseds.LinkId]*linkMeta |
| 98 | |
| 99 | upstreamBufLock sync.Mutex |
| 100 | upstreamBufCond *sync.Cond |
| 101 | upstreamBuf []messageWrap |
| 102 | upstreamLoopStarted bool |
| 103 | |
| 104 | linkBacklogCond *sync.Cond |
| 105 | linkMsgBacklog map[baseds.LinkId][]backlogMessageWrap |
| 106 | backlogHighWaterMark map[baseds.LinkId]int |
| 107 | |
| 108 | controlRpc *WshRpc |
| 109 | } |
| 110 | |
| 111 | func MakeConnectionRouteId(connId string) string { |
| 112 | return "conn:" + connId |
nothing calls this directly
no outgoing calls
no test coverage detected