Skip to content

sdk.action_broker

@type library Global action broker for coordinating independent scripts. Actions reserve one or more channels atomically, then keep those channels until their acknowledgement arrives (or the action fails/cancels). Network callbacks only enqueue copied evidence; pump() is the sole callback execution point.

lua
local M = require("sdk.action_broker")

Constants

Lua 5.4 has no enums — these are integer (or string) fields on the module.

NameValueSummary
ackAckAcknowledge a finished action ticket so the broker can release its channel.
acksAckAlias of ack.
OwnerOwnerOwner class used to claim channels.
TicketTicketTicket class representing one in-flight action.
LeaseLeaseLease class for a temporary exclusive channel hold.
normalize_channelsnormalize_channelsNormalize a channel name or list into the canonical set.

channel

alias · channel = channels

Same as channels.

Alias

Same as channels.

priority

alias · priority = priorities

Same as priorities.

Alias

Same as priorities.

bind_runtime

function · bind_runtime()

Bind broker pumping to the script tick so queued work advances.

runtime_tick_bound

function · runtime_tick_bound()

True when bind_runtime has attached a tick handler.

owner

function · owner(name, opts)

Owner API ------------------------------------------------------------------

event

function · event(name, ev, now)

Event queue and pump --------------------------------------------------------

observe

alias · observe = event

Same as event.

Alias

Same as event.

notify

alias · notify = event

Same as event.

Alias

Same as event.

pump

function · pump(now)

Advance queued tickets and leases; call from a tick if you are not using bind_runtime.

generation

function · generation()

Monotonic generation that increments when the broker resets.

event_sequence

function · event_sequence()

Monotonic counter of observed events.

blocker

function · blocker(channels, priority)

Install a high-priority channel blocker that preempts lower owners.

snapshot

function · snapshot()

Diagnostic snapshot of owners, tickets, and channel state.

diagnostics

function · diagnostics()

Human-readable broker diagnostics for logs.

Arcane SDK catalog generated from scripts/sdk