Expand description
Database-backed runtime lease store.
Runtime leases coordinate process-level singleton components across service instances. The table is deliberately small and infrastructure-owned: it records the current owner of a lease key and the timestamp at which another process may take over. Product crates still decide which worker groups are singleton and run their own migrations; this module provides the shared entity, store implementation, and stable table/column names.
Structs§
- Active
Model - Generated by sea-orm-macros
- Column
Iter - An iterator over the variants of Column
- Entity
- Generated by sea-orm-macros
- Model
- SeaORM model for
runtime_leases. - Primary
KeyIter - An iterator over the variants of PrimaryKey
- Relation
Iter - An iterator over the variants of Relation
- Runtime
Lease DbStore - SeaORM-backed implementation of [
RuntimeLeaseStore].
Enums§
- Column
- Generated by sea-orm-macros
- Primary
Key - Generated by sea-orm-macros
- Relation
Constants§
- RUNTIME_
LEASES_ TABLE - Runtime lease table name.
- RUNTIME_
LEASE_ CREATED_ AT_ COLUMN - Runtime lease created-at column name.
- RUNTIME_
LEASE_ EXPIRES_ AT_ COLUMN - Runtime lease expiry column name.
- RUNTIME_
LEASE_ ID_ COLUMN - Runtime lease identifier column name.
- RUNTIME_
LEASE_ LAST_ RENEWED_ AT_ COLUMN - Runtime lease last-renewed column name.
- RUNTIME_
LEASE_ OWNER_ ID_ COLUMN - Runtime lease owner column name.
- RUNTIME_
LEASE_ UPDATED_ AT_ COLUMN - Runtime lease updated-at column name.
Functions§
- create_
runtime_ leases_ table - Builds the shared
runtime_leasestable creation statement. - drop_
runtime_ leases_ table - Builds the shared
runtime_leasestable drop statement.