Skip to main content

Module runtime_lease

Module runtime_lease 

Source
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§

ActiveModel
Generated by sea-orm-macros
ColumnIter
An iterator over the variants of Column
Entity
Generated by sea-orm-macros
Model
SeaORM model for runtime_leases.
PrimaryKeyIter
An iterator over the variants of PrimaryKey
RelationIter
An iterator over the variants of Relation
RuntimeLeaseDbStore
SeaORM-backed implementation of [RuntimeLeaseStore].

Enums§

Column
Generated by sea-orm-macros
PrimaryKey
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_leases table creation statement.
drop_runtime_leases_table
Builds the shared runtime_leases table drop statement.