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

Function GetWshRpcFromContext

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

Source from the content-addressed store, hash-verified

75}
76
77func GetWshRpcFromContext(ctx context.Context) *WshRpc {
78 rtn := ctx.Value(wshRpcContextKey{})
79 if rtn == nil {
80 return nil
81 }
82 return rtn.(*WshRpc)
83}
84
85func GetRpcSourceFromContext(ctx context.Context) string {
86 rtn := ctx.Value(wshRpcRespHandlerContextKey{})

Calls 1

ValueMethod · 0.80

Tested by

no test coverage detected