Skip to main content

Module modules

Module modules 

Source
Expand description

Sidecar module registration + health (Phase B of the plugin platform).

Registering a sidecar atomically mints three reversible things: a scoped API key the sidecar uses to call kernel APIs, a webhook subscription that feeds it the events it subscribes to, and (via the stored row) a reverse-proxy mount at /m/{id}/*. Unregistering deletes all three. A background loop probes each sidecar’s /heldar/health and records reachability.

Constants§

HEALTH_PATH
Path on the sidecar the health probe hits; a 2xx means healthy.
WEBHOOK_EVENTS_PATH
Path on the sidecar that receives signed event deliveries (the minted webhook points here).

Functions§

get_registered
list_registered
register
Register a sidecar: mint its scoped key + webhook subscription and persist the row, atomically. Returns the stored row plus the once-only credentials (plaintext key + webhook secret).
run
Background loop: probe each registered sidecar’s /heldar/health and record reachability so the dashboard can badge healthy/unreachable plugins. Never returns (supervised).
unregister
Unregister a sidecar: delete its row, revoke its API key, and remove its webhook subscription (its delivery ledger cascades). Idempotent-ish: returns NotFound if the id is unknown.