Expand description
Bidirectional NDJSON protocol between Rust runtime and TypeScript process.
Messages are newline-delimited JSON objects. Each function invocation gets
a unique call_id for multiplexing concurrent calls over a single connection.
Structs§
- Auth
Info - Auth context passed to function handlers.
- Call
Message - Invoke a function on the TypeScript side.
- Cancel
Schedule Message - Cancel a scheduled function.
- DbOp
Message - A database operation request from TypeScript.
- DbResult
Message - Result of a DB operation, sent back to TypeScript.
- Error
Info - Error info in protocol messages.
- Error
Message - Function failed.
- Ready
Message - Handshake payload from the TS runtime.
- Request
Info - HTTP request metadata forwarded to TypeScript actions invoked via
defineRoutebindings. All fields are strings so the TS side can use them directly without re-parsing. - Return
Message - Function returned successfully.
- RunFn
Message - Call another function from within an action.
- Schedule
Message - Schedule a function for future execution.
- Stream
Chunk Message - A stream chunk to forward to the HTTP client as SSE.