Files
plainleaf/lib/plugos/syscalls/mq.ts
T
Zef HemelandGitHub dc2987a3f9 Sync engine rearchitecture (#1516)
* Don't require auth for .ping
* Finally introducing loggers
* Remove file list caching from disk_space_primitives
I don't think this is required anymore with the sync model
* Simplification of space primitives and more tests
* More reliable online status
* Add .zed settings
* Remove selfUpdate argument from `writeFile` no longer used
- Add `sync` config schema and document sync options
- Move sync config handling to client boot logic
- Move BootConfig type to ui_types.ts
- Remove sync env vars from server
- Update documentation for sync and architecture
* Improve sync logic and proxy routing for full sync state
* Add BoxProxy for late-bound client and improve Lua boot
- Add isMobile syscall for editor
* Add concurrency to sync process and log indexing duration
* Better service worker lifecycle management
2025-09-12 14:43:57 +02:00

31 lines
891 B
TypeScript

import type { DataStoreMQ } from "../../data/mq.datastore.ts";
import type { SysCallMapping } from "../system.ts";
export function mqSyscalls(
mq: DataStoreMQ,
): SysCallMapping {
return {
"mq.send": (_ctx, queue: string, body: any) => {
return mq.send(queue, body);
},
"mq.batchSend": (_ctx, queue: string, bodies: any[]) => {
return mq.batchSend(queue, bodies);
},
"mq.ack": (_ctx, queue: string, id: string) => {
return mq.ack(queue, id);
},
"mq.batchAck": (_ctx, queue: string, ids: string[]) => {
return mq.batchAck(queue, ids);
},
"mq.flushQueue": (_ctx, queue: string) => {
return mq.flushQueue(queue);
},
"mq.getQueueStats": (_ctx, queue: string) => {
return mq.getQueueStats(queue);
},
"mq.awaitEmptyQueue": (_ctx, queue: string) => {
return mq.awaitEmptyQueue(queue);
},
};
}