MCPcopy Create free account
hub / github.com/cloudflare/computer / streamFor

Function streamFor

packages/rpc/tests/shell-and-composite.test.ts:54–61  ·  view source on GitHub ↗
(rec: ExecRecord)

Source from the content-addressed store, hash-verified

52 let counter = 0;
53
54 function streamFor(rec: ExecRecord): ReadableStream<ExecEvent> {
55 return new ReadableStream<ExecEvent>({
56 start(controller) {
57 for (const ev of rec.events) controller.enqueue(ev);
58 controller.close();
59 },
60 });
61 }
62
63 return {
64 records,

Callers 2

execFunction · 0.85
getFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected