pub struct RegistryBackend { /* private fields */ }Expand description
The registry backend — the pair bound onto the core’s published
registry traits (GitRegistry /
GitRegistryStore); the first complete impl is the
in-memory binding (test-only now — review 006 R-4, the bare mem
pair is not a production surface; the production mem composition
is the entry’s mem shape) and the engine twins bind through the
same type.
Resolve rides the read side (CachedRegistryProvider in the
composed assemblies; the miss maps to RegistryError::NotFound
— a definitive unresolved id, with the unknown ≡ unauthorized
collapse at the wire-layer caller, exactly as before). The store
methods ride the write side, announcing nothing (the reactor owns
post-commit announce) and, when a provider is bound with
RegistryBackend::with_cached_provider, writing through so the
this-process mutation is visible to the hot path without waiting
for the wake-driven refresh.
Implementations§
Source§impl RegistryBackend
impl RegistryBackend
Sourcepub fn new(write: Arc<dyn RegistryWrite>, read: Arc<dyn RegistryRead>) -> Self
pub fn new(write: Arc<dyn RegistryWrite>, read: Arc<dyn RegistryRead>) -> Self
Bind the pair as-is (no write-through leg — a resolver over an external cached provider’s refresh cadence, or direct state).
Sourcepub fn with_cached_provider(
write: Arc<dyn RegistryWrite>,
provider: Arc<CachedRegistryProvider>,
) -> Self
pub fn with_cached_provider( write: Arc<dyn RegistryWrite>, provider: Arc<CachedRegistryProvider>, ) -> Self
Bind the pair with the cached provider on both legs: resolves serve the provider, the store methods write through to it. The engine-twin binding.
Sourcepub fn write(&self) -> &Arc<dyn RegistryWrite> ⓘ
pub fn write(&self) -> &Arc<dyn RegistryWrite> ⓘ
The durable write side (the reactor’s announce composition and reconcile sweep consume it directly).
Sourcepub fn read(&self) -> &Arc<dyn RegistryRead> ⓘ
pub fn read(&self) -> &Arc<dyn RegistryRead> ⓘ
The read side (the hot read).
Sourcepub fn provider(&self) -> Option<&Arc<CachedRegistryProvider>>
pub fn provider(&self) -> Option<&Arc<CachedRegistryProvider>>
The write-through provider, when bound with
RegistryBackend::with_cached_provider.
Trait Implementations§
Source§impl GitRegistry for RegistryBackend
impl GitRegistry for RegistryBackend
Source§fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<RepoRecord, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<RepoRecord, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
RegistryError). Read more