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";
|
|
|
|
import { transportSyscalls } from "../../plugos/syscall/transport";
|
2022-03-25 11:03:06 +00:00
|
|
|
|
|
|
|
export default function indexerSyscalls(space: Space): SysCallMapping {
|
|
|
|
return transportSyscalls(
|
|
|
|
[
|
|
|
|
"scanPrefixForPage",
|
|
|
|
"scanPrefixGlobal",
|
|
|
|
"get",
|
|
|
|
"set",
|
|
|
|
"batchSet",
|
|
|
|
"delete",
|
|
|
|
],
|
|
|
|
(name, ...args) => space.wsCall(`index.${name}`, ...args)
|
|
|
|
);
|
|
|
|
}
|