pub struct Driver<R, E> { /* private fields */ }Expand description
Mechanical loop that performs the directives the sans-I/O kernel issues.
This is a reference runtime skeleton. It drives one step synchronously —
claim, execute, settle — and never heartbeats or reclaims within a step: it does
not extend a lease while its executor runs (so a long-running pact’s lease can
expire mid-step), and it settles by matching the retainer rather than
re-claiming. It is therefore safe for pacts shorter than the lease (the lease
never expires mid-step)
and for single-worker use (no concurrent claimer can reclaim an expired lease
mid-step). A workload that is both long-running and multi-worker should compose
its own loop over the Registry contract (which includes heartbeat); the
lifecycle kernel deliberately models no in-flight heartbeat.
Implementations§
Source§impl<R, E> Driver<R, E>
impl<R, E> Driver<R, E>
Sourcepub fn new(
registry: R,
executor: E,
dockets: impl IntoIterator<Item = String>,
) -> Self
pub fn new( registry: R, executor: E, dockets: impl IntoIterator<Item = String>, ) -> Self
Build a driver from a registry, an executor, and docket names.