pub struct FlowManager { /* private fields */ }Expand description
The Tier 2 flow manager: opens and resumes durable flows over a Journal,
running each step’s effect through the Tier 1 Engine. One per process,
&self-concurrent; hands out a &mut FlowHandle per running flow.
Implementations§
Source§impl FlowManager
impl FlowManager
Sourcepub fn new(
engine: Arc<Engine>,
journal: Arc<dyn Journal>,
clock: Arc<dyn Clock>,
holder: ProcessId,
) -> Self
pub fn new( engine: Arc<Engine>, journal: Arc<dyn Journal>, clock: Arc<dyn Clock>, holder: ProcessId, ) -> Self
A manager with the default FlowConfig.
Sourcepub fn with_config(
engine: Arc<Engine>,
journal: Arc<dyn Journal>,
clock: Arc<dyn Clock>,
holder: ProcessId,
config: FlowConfig,
) -> Self
pub fn with_config( engine: Arc<Engine>, journal: Arc<dyn Journal>, clock: Arc<dyn Clock>, holder: ProcessId, config: FlowConfig, ) -> Self
A manager with explicit tuning.
Sourcepub fn enter_flow(&self, desc: &FlowDescriptor) -> Result<FlowHandle, KeelError>
pub fn enter_flow(&self, desc: &FlowDescriptor) -> Result<FlowHandle, KeelError>
Enter (begin or resume) the flow with this identity: open the row
(idempotent), take the lease, and hand back a handle in replay-or-live
mode. Err when the lease is held by a live holder (KEEL-E030) or the
flow is already dead (KEEL-E032).
§Errors
KEEL-E030if another holder’s lease is still valid.KEEL-E032if the flow isdead(never auto-resumed).KEEL-E040if the journal cannot open the flow row.
Sourcepub fn resume_flow(
&self,
flow: &FlowDescriptor,
current_code_hash: Option<&str>,
) -> Result<FlowHandle, KeelError>
pub fn resume_flow( &self, flow: &FlowDescriptor, current_code_hash: Option<&str>, ) -> Result<FlowHandle, KeelError>
Resume a flow the recovery scan surfaced (Journal::incomplete_flows),
fencing against the currently-deployed code_hash.
§Errors
As enter_flow.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FlowManager
impl !UnwindSafe for FlowManager
impl Freeze for FlowManager
impl Send for FlowManager
impl Sync for FlowManager
impl Unpin for FlowManager
impl UnsafeUnpin for FlowManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more