pub struct Registry { /* private fields */ }Expand description
Registry activation - backend discovery and registration service
Implementations§
Source§impl Registry
impl Registry
Sourcepub async fn new(config: RegistryStorageConfig) -> Result<Self, String>
pub async fn new(config: RegistryStorageConfig) -> Result<Self, String>
Create a new Registry instance with the given configuration
Sourcepub async fn with_defaults() -> Result<Self, String>
pub async fn with_defaults() -> Result<Self, String>
Create with default configuration
Sourcepub fn set_local_backend(&self, _name: String, _description: Option<String>)
pub fn set_local_backend(&self, _name: String, _description: Option<String>)
Set the local backend name (called by the host)
Trait Implementations§
Source§impl Activation for Registry
impl Activation for Registry
type Methods = RegistryMethod
fn namespace(&self) -> &str
fn version(&self) -> &str
Source§fn description(&self) -> &str
fn description(&self) -> &str
Short description (max 15 words)
Source§fn long_description(&self) -> Option<&str>
fn long_description(&self) -> Option<&str>
Long description (optional, for detailed documentation)
fn methods(&self) -> Vec<&str>
fn method_help(&self, method: &str) -> Option<String>
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<PlexusStream, PlexusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn into_rpc_methods(self) -> Methods
Source§fn plugin_schema(&self) -> PluginSchema
fn plugin_schema(&self) -> PluginSchema
Return this activation’s schema (methods + optional children)
Source§fn plugin_id(&self) -> Uuid
fn plugin_id(&self) -> Uuid
Stable activation instance ID for handle routing
By default generates a deterministic UUID from namespace+major_version
Using major version only ensures handles survive minor/patch upgrades (semver)
fn resolve_handle<'life0, 'life1, 'async_trait>(
&'life0 self,
_handle: &'life1 Handle,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Source§impl RegistryRpcServer for Registry
impl RegistryRpcServer for Registry
Source§fn register<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
name: String,
host: String,
port: u16,
protocol: Option<String>,
description: Option<String>,
namespace: Option<String>,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
name: String,
host: String,
port: u16,
protocol: Option<String>,
description: Option<String>,
namespace: Option<String>,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Register a new backend
Source§fn list<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
active_only: Option<bool>,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
active_only: Option<bool>,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all registered backends
Source§fn get<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
name: String,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
name: String,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a specific backend by name
Source§fn update<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
name: String,
host: Option<String>,
port: Option<u16>,
protocol: Option<String>,
description: Option<String>,
namespace: Option<String>,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
name: String,
host: Option<String>,
port: Option<u16>,
protocol: Option<String>,
description: Option<String>,
namespace: Option<String>,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update an existing backend
Source§fn delete<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
name: String,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
name: String,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete a backend
Source§fn ping<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
name: String,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ping<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
name: String,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Ping a backend to update its last_seen timestamp
Source§fn reload<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reload<'life0, 'async_trait>(
&'life0 self,
pending: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reload the configuration file
Auto Trait Implementations§
impl Freeze for Registry
impl !RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl !UnwindSafe for Registry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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