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

Method StreamTestCommand

pkg/wshrpc/wshserver/wshserver.go:101–114  ·  view source on GitHub ↗

for testing

(ctx context.Context)

Source from the content-addressed store, hash-verified

99
100// for testing
101func (ws *WshServer) StreamTestCommand(ctx context.Context) chan wshrpc.RespOrErrorUnion[int] {
102 rtn := make(chan wshrpc.RespOrErrorUnion[int])
103 go func() {
104 defer func() {
105 panichandler.PanicHandler("StreamTestCommand", recover())
106 }()
107 for i := 1; i <= 5; i++ {
108 rtn <- wshrpc.RespOrErrorUnion[int]{Response: i}
109 time.Sleep(1 * time.Second)
110 }
111 close(rtn)
112 }()
113 return rtn
114}
115
116func MakePlotData(ctx context.Context, blockId string) error {
117 block, err := wstore.DBMustGet[*waveobj.Block](ctx, blockId)

Callers

nothing calls this directly

Calls 1

PanicHandlerFunction · 0.92

Tested by

no test coverage detected