Expand description
§entelix-persistence
Postgres + Redis backends for the three storage traits owned by
other crates: entelix_graph::Checkpointer,
entelix_memory::Store, and the session event log
(entelix_session::SessionGraph). Each backend is a
*Persistence bundle — a single builder produces a
(Checkpointer, Store, SessionLog) triplet sharing one connection
pool / lock backend.
Distributed session locking lives behind the DistributedLock
trait; with_session_lock composes lock acquisition with a
caller closure (invariant 8 — durable session writes happen under
a lock).
Cargo features:
postgres— pullssqlx, enables thepostgresmodule.redis— pullsredis, enables theredismodule.test-containers— pullstestcontainersfor ephemeral docker integration tests; implies both backends.
Re-exports§
pub use advisory_key::AdvisoryKey;pub use error::PersistenceError;pub use error::PersistenceResult;pub use lock::DistributedLock;pub use lock::LockGuard;pub use lock::with_session_lock;pub use schema_version::SessionSchemaVersion;
Modules§
- advisory_
key - Advisory lock key derivation.
- error
- Crate-internal error type. Public APIs map this back into
entelix_core::Error::Persistence(orProvider) at the orchestration layer. - lock
- Distributed lock primitives.
- postgres
postgres - Postgres-backed persistence —
Checkpointer<S>,Store<V>,SessionLog, and aDistributedLockoverpg_advisory_xact_lock. - redis
redis - Redis-backed persistence —
Checkpointer<S>,Store<V>,SessionLog, and aDistributedLockoverSET NX PXplus a Lua release script. - schema_
version - Persisted-payload schema version stamps.