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

Function createSyncServer

packages/rpc/src/server.ts:310–316  ·  view source on GitHub ↗
(db: Database, options: ServerOptions = {})

Source from the content-addressed store, hash-verified

308// back the object to mount on each connection via
309// acceptWebSocketSession().
310export function createSyncServer(db: Database, options: ServerOptions = {}): SyncRPC {
311 return new SyncRPCServer(db, {
312 ignore: options.ignore ?? [],
313 afterApply: options.afterApply,
314 beforeFetch: options.beforeFetch,
315 });
316}
317
318// Construct a ShellRPC bound to a Runner. computerd holds the only
319// Runner today; tests can pass a fake that implements RunnerLike.

Callers 5

makePeerFunction · 0.85
makePeerFunction · 0.85
makeReceiverWithSpyFunction · 0.85
createWorkspaceServerFunction · 0.85
startHarnessFunction · 0.85

Calls

no outgoing calls

Tested by 3

makePeerFunction · 0.68
makeReceiverWithSpyFunction · 0.68
startHarnessFunction · 0.68