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

Function makeBackend

packages/computer/src/workspace.test.ts:135–146  ·  view source on GitHub ↗
(
  id: string,
  rpc?: import("@cloudflare/computer-rpc").SyncRPC,
)

Source from the content-addressed store, hash-verified

133}
134
135function makeBackend(
136 id: string,
137 rpc?: import("@cloudflare/computer-rpc").SyncRPC,
138): WorkspaceBackend {
139 return {
140 id,
141 type: "fake",
142 async connect(): Promise<BackendHandle> {
143 return { rpc: composite(rpc ?? fakeRpc()), close: async () => {} };
144 },
145 };
146}
147
148// Backend with a wired shell.exec that pings a counter on every
149// call. exec resolves immediately with an empty event stream so

Callers 1

workspace.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected