1
0
silverbullet/webapp/syscalls/index.ts

18 lines
511 B
TypeScript
Raw Normal View History

2022-04-05 15:02:17 +00:00
import { SysCallMapping } from "../../plugos/system";
import { proxySyscalls } from "../../plugos/syscalls/transport";
import { WatchableSpace } from "../spaces/cache_space";
2022-03-25 11:03:06 +00:00
export function indexerSyscalls(space: WatchableSpace): SysCallMapping {
2022-04-05 15:02:17 +00:00
return proxySyscalls(
2022-03-25 11:03:06 +00:00
[
"index.scanPrefixForPage",
"index.scanPrefixGlobal",
"index.get",
"index.set",
"index.batchSet",
"index.delete",
2022-03-25 11:03:06 +00:00
],
2022-04-05 15:02:17 +00:00
(ctx, name, ...args) => space.proxySyscall(ctx.plug, name, args)
2022-03-25 11:03:06 +00:00
);
}