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