Skip to main content

Module lease

Module lease 

Source
Expand description

Lease management for Phase 1: single-owner execution, expiry, and recovery.

WorkerLease wraps super::models::LeaseRecord to strictly enforce single-owner execution: call WorkerLease::verify_owner and WorkerLease::is_expired before running work. Lease expiry and recovery are handled by LeaseManager::tick (expire stale leases, requeue attempts); replay-restart is re-dispatch after requeue.

Structs§

LeaseConfig
Lease behavior tuning knobs for scheduler/data-plane coordination.
LeaseTickResult
Result of a periodic lease tick.
RepositoryLeaseManager
Skeleton lease manager using RuntimeRepository.
WorkerHealth
Per-worker health statistics maintained by the scheduler or control plane.
WorkerHealthTracker
Thread-safe tracker that records per-worker health statistics.
WorkerLease
Strict single-owner execution guard for a lease. Verify ownership and expiry before executing.

Traits§

LeaseManager
Lease manager abstraction.