pub(crate) struct SourceObservationRegistry {
process_nonce: [u8; 16],
entries: Mutex<HashMap<SourceBinding, Arc<SourceObservationEntry>>>,
}Expand description
Bounded process-local registry shared by every clone of one MCP server.
Fields§
§process_nonce: [u8; 16]Random identity distinguishing epochs created by this process.
entries: Mutex<HashMap<SourceBinding, Arc<SourceObservationEntry>>>Bounded observers keyed by exact source binding.
Implementations§
Source§impl SourceObservationRegistry
impl SourceObservationRegistry
Sourcepub(crate) fn with_verified_read<T, F>(
&self,
database: &Path,
root: &Path,
config: Option<&Path>,
control: &IndexWorkControl,
query: F,
) -> Result<VerifiedReadOutcome<T>, CliError>
pub(crate) fn with_verified_read<T, F>( &self, database: &Path, root: &Path, config: Option<&Path>, control: &IndexWorkControl, query: F, ) -> Result<VerifiedReadOutcome<T>, CliError>
Run one complete query inside a source-epoch and SQLite-generation boundary.
Sourcefn entry(
&self,
binding: SourceBinding,
) -> Result<Option<Arc<SourceObservationEntry>>, CliError>
fn entry( &self, binding: SourceBinding, ) -> Result<Option<Arc<SourceObservationEntry>>, CliError>
Reuse or admit the bounded observer for an exact source binding.
Sourcefn with_observed_read<T, F>(
&self,
entry: &SourceObservationEntry,
control: &IndexWorkControl,
query: F,
) -> Result<VerifiedReadOutcome<T>, CliError>
fn with_observed_read<T, F>( &self, entry: &SourceObservationEntry, control: &IndexWorkControl, query: F, ) -> Result<VerifiedReadOutcome<T>, CliError>
Retry a query until one observed epoch remains valid through acceptance.
Sourcefn prepare_observed_store(
&self,
entry: &SourceObservationEntry,
control: &IndexWorkControl,
work: &mut VerifiedReadWork,
) -> Result<(AtlasStore, VerifiedSourceEpoch), CliError>
fn prepare_observed_store( &self, entry: &SourceObservationEntry, control: &IndexWorkControl, work: &mut VerifiedReadWork, ) -> Result<(AtlasStore, VerifiedSourceEpoch), CliError>
Open a snapshot backed by a current epoch or establish a new exact epoch.
Sourcefn accepts_observed_result(
entry: &SourceObservationEntry,
epoch: &VerifiedSourceEpoch,
control: &IndexWorkControl,
) -> Result<bool, CliError>
fn accepts_observed_result( entry: &SourceObservationEntry, epoch: &VerifiedSourceEpoch, control: &IndexWorkControl, ) -> Result<bool, CliError>
Confirm that no source, policy, or observer event invalidated a query result.
Sourcefn with_exact_fallback<T, F>(
&self,
binding: &SourceBinding,
control: &IndexWorkControl,
query: F,
) -> Result<VerifiedReadOutcome<T>, CliError>
fn with_exact_fallback<T, F>( &self, binding: &SourceBinding, control: &IndexWorkControl, query: F, ) -> Result<VerifiedReadOutcome<T>, CliError>
Exact-per-call compatibility path when a native observer cannot be admitted.
Trait Implementations§
Source§impl Debug for SourceObservationRegistry
impl Debug for SourceObservationRegistry
Auto Trait Implementations§
impl !Freeze for SourceObservationRegistry
impl RefUnwindSafe for SourceObservationRegistry
impl Send for SourceObservationRegistry
impl Sync for SourceObservationRegistry
impl Unpin for SourceObservationRegistry
impl UnwindSafe for SourceObservationRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more