1
0
silverbullet/webapp/syscalls/indexer.ts
2022-04-05 17:02:17 +02:00

18 lines
487 B
TypeScript

import { Space } from "../spaces/space";
import { SysCallMapping } from "../../plugos/system";
import { proxySyscalls } from "../../plugos/syscalls/transport";
export function indexerSyscalls(space: Space): SysCallMapping {
return proxySyscalls(
[
"index.scanPrefixForPage",
"index.scanPrefixGlobal",
"index.get",
"index.set",
"index.batchSet",
"index.delete",
],
(ctx, name, ...args) => space.proxySyscall(ctx.plug, name, args)
);
}