MCPcopy Create free account
hub / github.com/deventlab/d-engine / get_eventual

Method get_eventual

d-engine-server/src/api/embedded_client.rs:264–269  ·  view source on GitHub ↗

Eventually consistent read (stale OK). Reads from local state machine without Leader coordination. Fast but may return stale data if replication is lagging. # Performance - Latency: ~0.1ms (local memory access) - Throughput: High (no Leader bottleneck) # Use Cases - Read-heavy workloads - Analytics/reporting (staleness acceptable) - Caching scenarios # Example ```ignore let client = engine.cli

(
        &self,
        key: impl AsRef<[u8]>,
    )

Source from the content-addressed store, hash-verified

262 /// let cached_value = client.get_eventual(b"user-preference").await?;
263 /// ```
264 pub async fn get_eventual(
265 &self,
266 key: impl AsRef<[u8]>,
267 ) -> ClientApiResult<Option<Bytes>> {
268 self.get_with_consistency(key, ReadConsistencyPolicy::EventualConsistency).await
269 }
270
271 /// Advanced: Read with explicit consistency policy.
272 ///

Calls 1

get_with_consistencyMethod · 0.80