Documentation Index
Fetch the complete documentation index at: https://iii.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
Call a function directly
Call a function by itsfunction_id from worker code (worker.trigger(...)) or from the terminal
(iii trigger). The engine routes the call to whatever worker registered the function; no trigger
registration is involved. The action field controls delivery: by default the call waits for the
function to return its result, or for the configured timeout to fire. Pass a different
TriggerAction to change that.
- Node / TypeScript
- Python
- Rust
- CLI
- Default (synchronous). No
actionset. The call waits for the function to return its result or for the configured timeout to fire. TriggerAction.Void(). Fire-and-forget. The call returns immediately; the function still runs but the caller doesn’t see the result.TriggerAction.Enqueue({ queue }). Provided by iii-queue. Routes the invocation through a named queue with retries; the call returns once the message is enqueued.
Workers can provide their own
TriggerActions. Check each worker’s
documentation for the action types it offers.Register a trigger
Functions can also run when a trigger is satisfied. A trigger can be any event that happens such as a request to anhttp endpoint, a cron job, a change in state, or any other trigger that a
worker supports. You can also write your own.
You bind triggers to functions via the function_id. The trigger declares its type, its config
(defined by each type), and the function to invoke.
- Node / TypeScript
- Python
- Rust
http type).
Bind multiple triggers to one function
It’s valid to bind multiple triggers to the samefunction_id and this can be done across any
number of types. Register a second trigger with the same function_id and a different type or
config; the function runs unchanged whether the call arrives over HTTP, on a cron schedule, or from
a queue message.
Gate a trigger with a condition
A trigger can carry an optionalcondition_function_id. When the trigger fires, the engine invokes
the condition function first; the target function_id only runs if the condition returns truthy.
Use this when the same event source should sometimes fire the function and sometimes skip it.
Unregister a trigger
Trigger registration returns a handle. Pass that handle toworker.unregisterTrigger(...) to drop
the trigger at runtime. When the worker disconnects, all of its triggers are removed automatically.