release-crate-docs: crate docs final pass — doc gate green with -D warnings posture recorded in AGENTS.md, warn(missing_docs) adopted on the four published crates (audit probe 0; Error enum+fields, sqlite substrate fuzz-surface fns filled), accuracy pass fixed core drifts (trim_to wake nuance, ADR-023 §2 domain rules + shared paragraph, QueueOpts gloss, MemStore::new exception) and engine postures (eleven-vs-ten tx-method count, spawn_blocking rationale via sync substrate, one-host cross-process honesty element), spec-side aligned (pg locks family + row-backed wording, mem clock-accessor home), two boundary-wording dispositions recorded for release-contract-window-close (try_recv arms, 8000-byte <= reading), queue round-trip doctest landed in alkstore-mem crate docs; task -> completed with Notes + Summary
This commit is contained in:
1 parent
5f5f6741d5
commit
8e27f4b64b
22 files changed
+289
-49
No files matched your search
+36
-3
@@ -29,13 +29,46 @@
|
||||
//! # Architecture
|
||||
//!
|
||||
//! The store instance *is* the state: guarded per-mechanism sections
|
||||
//! (`crate::state`) behind short-held synchronous internal locks,
|
||||
//! behind short-held synchronous internal locks,
|
||||
//! tokio primitives for cross-await coordination. The tx seam is an
|
||||
//! overlay ([`crate::tx`] — stage in the handle-private overlay, commit
|
||||
//! overlay (`tx` — stage in the handle-private overlay, commit
|
||||
//! merges atomically + wakes at commit, drop discards); wakes route
|
||||
//! through in-process channels (`crate::wakes`) — delivered at the
|
||||
//! through in-process channels (`wakes`) — delivered at the
|
||||
//! commit boundary directly to each open receiver, per-subscriber FIFO
|
||||
//! by commit order, never coalesced (no batching boundary exists).
|
||||
//!
|
||||
//! # Example
|
||||
//!
|
||||
//! The honest-ephemeral engine is the zero-config one, so this crate
|
||||
//! carries the contract round-trip example: open with one call,
|
||||
//! enqueue a job, claim it back (the other engines construct through
|
||||
//! their `open` form with a connection target and opts — the surface
|
||||
//! round-trip below is identical there).
|
||||
//!
|
||||
//! ```
|
||||
//! use alkstore::{EnqueueOpts, JobHandle, QueueOpts, Store};
|
||||
//! use alkstore_mem::MemStore;
|
||||
//!
|
||||
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
//! let rt = tokio::runtime::Builder::new_current_thread().build()?;
|
||||
//! let store = MemStore::new();
|
||||
//! let queue = rt.block_on(store.queue("demo", QueueOpts::default()))?;
|
||||
//! let job_id = rt.block_on(queue.enqueue(
|
||||
//! serde_json::json!("hello"),
|
||||
//! EnqueueOpts::default(),
|
||||
//! ))?;
|
||||
//! let claimed = rt.block_on(queue.claim_one("worker-1"))?
|
||||
//! .expect("the enqueued job is claimable");
|
||||
//! assert_eq!(claimed.job().id, job_id);
|
||||
//! assert_eq!(claimed.job().state, alkstore::JobState::Processing);
|
||||
//! # Ok(())
|
||||
//! # }
|
||||
//! ```
|
||||
//!
|
||||
//! Every public item carries doc text; the missing-docs lint is part
|
||||
//! of the standing gates.
|
||||
|
||||
#![warn(missing_docs)]
|
||||
|
||||
mod clock;
|
||||
mod lock;
|
||||
|
||||
Reference in new issue
Block a user