Expand description
Runtime lease supervision for multi-instance services.
A runtime lease protects process-level singleton groups such as schedulers, cleanup loops, outbox dispatchers, and other background producers that must run on only one service instance at a time. It is intentionally separate from task-row processing leases: task leases protect one persisted work item, while runtime leases decide which process is allowed to start a whole worker group.
The storage backend is abstracted by RuntimeLeaseStore. Database-backed
services can use the store provided by aster_forge_db; tests and other
deployments can provide their own implementation. The supervisor remains
conservative: if renewal fails or ownership is lost, it cancels the leased
workload before trying to acquire the lease again.
Structs§
- Runtime
Lease Claim - Acquisition request passed to a runtime lease store.
- Runtime
Lease Config - Runtime lease settings for one singleton worker group.
- Runtime
Lease Owner - Current owner observed when a lease is held by another process.
Enums§
- Runtime
Lease Acquire - Result of one acquisition attempt.
Constants§
- DEFAULT_
RUNTIME_ LEASE_ RETRY_ INTERVAL - Minimum retry interval used when a caller provides a zero duration.
- DEFAULT_
RUNTIME_ LEASE_ TTL - Minimum lease TTL used when a caller provides a zero duration.
Traits§
- Runtime
Lease Store - Store contract used by runtime lease supervisors.
Functions§
- new_
runtime_ lease_ owner_ id - Generates a process-unique runtime lease owner ID.
- run_
runtime_ lease_ supervisor - Runs one singleton worker group behind a runtime lease.