pub struct Coordination<'a>(/* private fields */);Implementations§
Source§impl<'a> Coordination<'a>
impl<'a> Coordination<'a>
pub fn new(store: &'a mut Store) -> Self
pub fn claim( &mut self, claim: &ClaimRequest<'_>, now_ms: i64, ) -> Result<Claim, StoreError>
pub fn renew( &mut self, ticket_id: &str, run_id: &str, lease_ms: i64, now_ms: i64, ) -> Result<Renewal, StoreError>
Sourcepub fn readopt(
&mut self,
ticket_id: &str,
run_id: &str,
lease_ms: i64,
now_ms: i64,
) -> Result<Renewal, StoreError>
pub fn readopt( &mut self, ticket_id: &str, run_id: &str, lease_ms: i64, now_ms: i64, ) -> Result<Renewal, StoreError>
Re-arms the lease of a run recovery has just adopted, accepting a lease that expired while this daemon was down. Denied for a run that has already settled.
Sourcepub fn start(
store: &Store,
start: &RunStart<'_>,
now_ms: i64,
) -> Result<Start, StoreError>
pub fn start( store: &Store, start: &RunStart<'_>, now_ms: i64, ) -> Result<Start, StoreError>
Turns a claimed run running once its agent process exists.
Takes the store by shared reference: the transition needs no exclusive connection state, and the runner’s stage hooks that call it hold only a shared borrow. It is an associated function for that reason alone — the coordination boundary is the same.
Sourcepub fn record_exit(
&mut self,
exit: &RunExit<'_>,
now_ms: i64,
) -> Result<Exit, StoreError>
pub fn record_exit( &mut self, exit: &RunExit<'_>, now_ms: i64, ) -> Result<Exit, StoreError>
Checkpoints an agent’s exit, granting the caller ownership of aftercare. The supervisor and crash recovery may both attempt this; exactly one is granted.
pub fn abandon( &mut self, run_id: &str, ticket_id: &str, now_ms: i64, ) -> Result<(), StoreError>
pub fn settle( &mut self, run_id: &str, ticket_id: &str, exit_code: Option<i32>, outcome: Outcome, evidence: &[EvidenceRecord], cooldown: Option<&CooldownUpdate<'_>>, now_ms: i64, ) -> Result<bool, StoreError>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Coordination<'a>
impl<'a> !Sync for Coordination<'a>
impl<'a> !UnwindSafe for Coordination<'a>
impl<'a> Freeze for Coordination<'a>
impl<'a> Send for Coordination<'a>
impl<'a> Unpin for Coordination<'a>
impl<'a> UnsafeUnpin for Coordination<'a>
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