Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/core / admitRunUnit

Function: admitRunUnit()

ts
function admitRunUnit(config, unit): Promise<() => Promise<void>>;

Defined in: packages/core/src/admission/engine-bracket.ts:111

Admits one run unit: resolves when the ticket is granted (or when the run signal aborts, after cancelling the ticket best effort), throws the typed AdmissionRejectedError on the terminal denied verdict, and returns the settle teardown (clear the renew timer, release).

Parameters

ParameterType
configEngineAdmissionConfig
unitAdmitRunUnitInput

Returns

Promise&lt;() => Promise&lt;void&gt;>