Host.RequestId
luastra/hostHost.RequestId is an opaque numeric identifier allocated for one asynchronous operation. Store it with the operation's purpose so app.resolve can correlate out-of-order completions without inspecting payload text.
Before you use it
Add luastra/host to this module's dependencies in luastra.json, then import it with require("luastra/host"). Declare the capability named on the function page in luastra.json. Save the returned RequestId with its purpose and implement app.resolve.
How it fits
Host.RequestId is an opaque correlation value for one asynchronous host operation.
When to use it
Use Host.RequestId as the key in a pending-operation map after starting an asynchronous Host request. Match and remove that key in app.resolve instead of relying on completion order.
Fields or definition
| Parameter | Type / values | Description |
|---|---|---|
| definition | number | Exact alias, union, or callable contract represented by Host.RequestId. |
What happens next
An opaque positive request identifier used only for correlation.
Failures and fixes
Undeclared capability, unavailable host support, denied permission, invalid input, deadline, network, or internal failure reaches the bounded failure path. Public completion codes are CANCELLED, DEADLINE, FORBIDDEN, INTERNAL, NETWORK, UNAUTHORIZED, and VALIDATION.
Availability
Public-source alpha capability API in 0.5.0-alpha; verify each claimed host independently.
Exact declaration
export type RequestId = number