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

Function GetRpcSourceFromContext

pkg/wshutil/wshrpc.go:85–91  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

83}
84
85func GetRpcSourceFromContext(ctx context.Context) string {
86 rtn := ctx.Value(wshRpcRespHandlerContextKey{})
87 if rtn == nil {
88 return ""
89 }
90 return rtn.(*RpcResponseHandler).GetSource()
91}
92
93func GetIsCanceledFromContext(ctx context.Context) bool {
94 rtn := ctx.Value(wshRpcRespHandlerContextKey{})

Callers 9

TestCommandMethod · 0.92
TestMultiArgCommandMethod · 0.92
EventPublishCommandMethod · 0.92
EventSubCommandMethod · 0.92
EventUnsubCommandMethod · 0.92
EventUnsubAllCommandMethod · 0.92
RouteAnnounceCommandMethod · 0.85
SetPeerInfoCommandMethod · 0.85

Calls 2

ValueMethod · 0.80
GetSourceMethod · 0.80

Tested by

no test coverage detected