2022-10-10 12:50:21 +00:00
|
|
|
import { SysCallMapping } from "../../plugos/system.ts";
|
|
|
|
import { proxySyscalls } from "../../plugos/syscalls/transport.ts";
|
|
|
|
import { Space } from "../../common/spaces/space.ts";
|
2022-03-25 11:03:06 +00:00
|
|
|
|
2022-04-07 13:21:30 +00:00
|
|
|
export function indexerSyscalls(space: Space): SysCallMapping {
|
2022-04-05 15:02:17 +00:00
|
|
|
return proxySyscalls(
|
2022-03-25 11:03:06 +00:00
|
|
|
[
|
2022-05-17 13:54:55 +00:00
|
|
|
"index.queryPrefix",
|
2022-04-03 16:42:12 +00:00
|
|
|
"index.get",
|
|
|
|
"index.set",
|
|
|
|
"index.batchSet",
|
|
|
|
"index.delete",
|
2022-03-25 11:03:06 +00:00
|
|
|
],
|
2022-10-10 12:50:21 +00:00
|
|
|
(ctx, name, ...args) => space.proxySyscall(ctx.plug, name, args),
|
2022-03-25 11:03:06 +00:00
|
|
|
);
|
|
|
|
}
|