Skip to main content

Module queue

Module queue 

Source
Expand description

Durable work queue types. Durable work queue — types shared across host components and the SDK.

Layer: L0 — these types live in yeti-types because the unified Context references QueuePayload via the queue_enqueue signature.

Structs§

QueueFn
Host-side registry entry for a #[queue_fn] discovered across loaded wasm apps. The worker dispatches by looking up (app_id, name) in the HashMap<(AppId, String), QueueFn> that the runtime maintains.
QueueFnEntry
App-scoped queue-fn entry.

Enums§

QueuePayload
The work a queue item represents. Persists in yeti-queue as msgpack inside the payload column.

Traits§

WasmQueueInvoker
Process-wide hook for routing queue jobs into wasm components.

Functions§

lookup_queue_fn
Look up a host-local QueueFn by name (ignores app_id — static-crate functions live in the same linker table as the host binary).
lookup_queue_fn_for_app
Look up a queue function for a specific app. Wraps the static- inventory lookup in a QueueFnEntry for uniform return shape. app_id is unused today (every registered queue_fn lives in the host’s static inventory) but kept on the signature so dispatch sites don’t have to change if a per-app surface returns.
set_wasm_queue_invoker
Install the process-wide wasm queue invoker. Idempotent — subsequent calls are no-ops (OnceLock).
wasm_queue_invoker
Get the installed wasm queue invoker, if any. yeti-queue’s dispatcher calls this on every Function-payload job to decide whether to route through wasm.