2022-03-25 11:03:06 +00:00
|
|
|
import { Space } from "../space";
|
2022-03-27 09:31:12 +00:00
|
|
|
import { SysCallMapping } from "../../plugos/system";
|
2022-03-29 09:21:32 +00:00
|
|
|
import { transportSyscalls } from "../../plugos/syscalls/transport";
|
2022-03-25 11:03:06 +00:00
|
|
|
|
|
|
|
export default function indexerSyscalls(space: Space): SysCallMapping {
|
|
|
|
return transportSyscalls(
|
|
|
|
[
|
|
|
|
"scanPrefixForPage",
|
|
|
|
"scanPrefixGlobal",
|
|
|
|
"get",
|
|
|
|
"set",
|
|
|
|
"batchSet",
|
|
|
|
"delete",
|
|
|
|
],
|
2022-03-31 12:28:07 +00:00
|
|
|
(ctx, name, ...args) => space.remoteSyscall(ctx.plug, `index.${name}`, args)
|
2022-03-25 11:03:06 +00:00
|
|
|
);
|
|
|
|
}
|