pub struct VectorIntrospectionRegistry { /* private fields */ }Expand description
Process-local registry the runtime publishes vector/artifact state
into. The shape mirrors storage::queue::presence::ConsumerPresenceRegistry
from issue #742: cheap mutex + small hashmap is the right fit
because the cardinality is bounded by the operator’s collection
count (dozens, not millions) and reads are dominated by snapshot.
Implementations§
Source§impl VectorIntrospectionRegistry
impl VectorIntrospectionRegistry
pub fn new() -> Self
Sourcepub fn publish(&self, vector: VectorMetadata, artifact: ArtifactMetadata)
pub fn publish(&self, vector: VectorMetadata, artifact: ArtifactMetadata)
Publish (or replace) the full introspection row for a collection. Callers in the engine compute the typed shape once at the right moment (collection create, artifact build start / finish, fallback toggle) and hand it over; the registry does not try to derive anything.
Sourcepub fn update_artifact(&self, artifact: ArtifactMetadata) -> bool
pub fn update_artifact(&self, artifact: ArtifactMetadata) -> bool
Replace only the artifact half (build start/finish, fallback toggle, error). No-op if the collection has not been published yet, because the artifact row alone has no useful meaning without the vector row it sits next to.
Sourcepub fn forget(&self, collection: &str) -> bool
pub fn forget(&self, collection: &str) -> bool
Drop a collection’s introspection row (e.g. on DROP COLLECTION).
Sourcepub fn snapshot(&self) -> Vec<VectorIntrospection>
pub fn snapshot(&self) -> Vec<VectorIntrospection>
Snapshot of every tracked collection, deterministically ordered
by collection so test assertions and Red UI tables both see
a stable shape.
Sourcepub fn get(&self, collection: &str) -> Option<VectorIntrospection>
pub fn get(&self, collection: &str) -> Option<VectorIntrospection>
Single-collection lookup, for the per-collection metadata endpoint Red UI hits when it opens one vector’s toolbar.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Debug for VectorIntrospectionRegistry
impl Debug for VectorIntrospectionRegistry
Source§impl Default for VectorIntrospectionRegistry
impl Default for VectorIntrospectionRegistry
Source§fn default() -> VectorIntrospectionRegistry
fn default() -> VectorIntrospectionRegistry
Auto Trait Implementations§
impl !Freeze for VectorIntrospectionRegistry
impl RefUnwindSafe for VectorIntrospectionRegistry
impl Send for VectorIntrospectionRegistry
impl Sync for VectorIntrospectionRegistry
impl Unpin for VectorIntrospectionRegistry
impl UnsafeUnpin for VectorIntrospectionRegistry
impl UnwindSafe for VectorIntrospectionRegistry
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request