pub struct ActorRegistry { /* private fields */ }Expand description
Global actor registry with symbolic names.
Provides service discovery for the actor system: LLM tool calls, external APIs, and inter-actor routing can find actors by name instead of opaque kernel IDs.
Implementations§
Source§impl ActorRegistry
impl ActorRegistry
Sourcepub fn register(
&mut self,
name: impl Into<String>,
kernel_id: KernelId,
) -> RegistryEvent
pub fn register( &mut self, name: impl Into<String>, kernel_id: KernelId, ) -> RegistryEvent
Register an actor by name.
If the name is already registered, updates the mapping and
emits an Updated event.
Register with metadata tags.
Sourcepub fn deregister(&mut self, name: &str) -> Option<RegistryEvent>
pub fn deregister(&mut self, name: &str) -> Option<RegistryEvent>
Deregister an actor by name.
Sourcepub fn deregister_kernel(&mut self, kernel_id: &KernelId) -> Vec<RegistryEvent>
pub fn deregister_kernel(&mut self, kernel_id: &KernelId) -> Vec<RegistryEvent>
Deregister all names associated with a kernel ID.
Sourcepub fn lookup_entry(&self, name: &str) -> Option<&RegistryEntry>
pub fn lookup_entry(&self, name: &str) -> Option<&RegistryEntry>
Lookup the full registry entry by name.
Sourcepub fn names_for(&self, kernel_id: &KernelId) -> Vec<&str>
pub fn names_for(&self, kernel_id: &KernelId) -> Vec<&str>
Lookup all names registered to a kernel ID.
Sourcepub fn lookup_pattern(&self, pattern: &str) -> Vec<(&str, &KernelId)>
pub fn lookup_pattern(&self, pattern: &str) -> Vec<(&str, &KernelId)>
Lookup actors by wildcard pattern.
Supports:
*matches any sequence of characters (excluding/)**matches any sequence including/?matches a single character
Examples:
"standards/*"matches"standards/isa"but not"standards/isa/500""standards/**"matches"standards/isa/500""isa_*"matches"isa_ontology","isa_rules"
Sourcepub fn list_names(&self) -> Vec<&str>
pub fn list_names(&self) -> Vec<&str>
List all registered names.
Sourcepub fn watch(&mut self, pattern: impl Into<String>) -> usize
pub fn watch(&mut self, pattern: impl Into<String>) -> usize
Add a watcher for registry changes.
Returns a watcher ID that can be used to retrieve events.
Sourcepub fn drain_events(&mut self, watcher_id: usize) -> Vec<RegistryEvent>
pub fn drain_events(&mut self, watcher_id: usize) -> Vec<RegistryEvent>
Drain events for a watcher.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ActorRegistry
impl RefUnwindSafe for ActorRegistry
impl Send for ActorRegistry
impl Sync for ActorRegistry
impl Unpin for ActorRegistry
impl UnsafeUnpin for ActorRegistry
impl UnwindSafe for ActorRegistry
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.