SandboxContext

What the runtime hands a sandbox adapter for every provider operation: the authority it re-checks at its real dispatch point.

The same adapter hook serves both authorities. Bound to the writer or claim that created it; nothing on it selects another.

A protocol: adapters implement it.

Properties

authoritySandboxAuthorityrequired

Who may dispatch a provider operation.

Methods

fence

Re-checks the authority: the owner still holds the branch lease at epoch, or the cleanup claim is still current on a collectable row. The adapter calls it at its real provider dispatch boundary, after any queueing; a failure means call nothing, and the operation returns that code: stale_epoch under owner authority, cleanup_claim_lost under cleanup authority, never an exception or an unavailable or timeout.

fence(): Promise<Result<void>>

Returns an error value with one of these codes: stale_epoch, cleanup_claim_lost.

Edit on GitHub

On this page