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

Method getLinkMeta

pkg/wshutil/wshrouter.go:594–606  ·  view source on GitHub ↗

synchronized, returns a copy

(linkId baseds.LinkId)

Source from the content-addressed store, hash-verified

592
593// synchronized, returns a copy
594func (router *WshRouter) getLinkMeta(linkId baseds.LinkId) *linkMeta {
595 if linkId == baseds.NoLinkId {
596 return nil
597 }
598 router.lock.Lock()
599 defer router.lock.Unlock()
600 lm := router.linkMap[linkId]
601 if lm == nil {
602 return nil
603 }
604 lmCopy := *lm
605 return &lmCopy
606}
607
608// synchronized, returns a copy
609func (router *WshRouter) getLinkForRoute(routeId string) *linkMeta {

Callers 7

handleNoRouteMethod · 0.95
sendMessageToLinkMethod · 0.95
runLinkClientRecvLoopMethod · 0.95
unbindRouteMethod · 0.95
bindRouteMethod · 0.95
SetPeerInfoCommandMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected