pub struct TaskRegistry { /* private fields */ }Expand description
Registry of running adapter instances
Implementations§
Source§impl TaskRegistry
impl TaskRegistry
pub fn new() -> Self
Sourcepub async fn get_all_status(&self) -> HashMap<String, (String, InstanceStatus)>
pub async fn get_all_status(&self) -> HashMap<String, (String, InstanceStatus)>
Get status of all instances
Sourcepub async fn get_status(&self, credential_id: &str) -> Option<InstanceStatus>
pub async fn get_status(&self, credential_id: &str) -> Option<InstanceStatus>
Get status of a specific instance
Sourcepub async fn is_running(&self, credential_id: &str) -> bool
pub async fn is_running(&self, credential_id: &str) -> bool
Check if an instance is running
Sourcepub async fn get_instance(&self, credential_id: &str) -> Option<(String, u16)>
pub async fn get_instance(&self, credential_id: &str) -> Option<(String, u16)>
Get instance by credential_id
Sourcepub async fn register(
&self,
credential_id: String,
instance_id: String,
adapter: String,
port: u16,
)
pub async fn register( &self, credential_id: String, instance_id: String, adapter: String, port: u16, )
Register a new instance
Sourcepub async fn update_status(&self, credential_id: &str, status: InstanceStatus)
pub async fn update_status(&self, credential_id: &str, status: InstanceStatus)
Update instance status
Sourcepub async fn remove(&self, credential_id: &str) -> Option<InstanceInfo>
pub async fn remove(&self, credential_id: &str) -> Option<InstanceInfo>
Remove an instance from registry
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for TaskRegistry
impl !RefUnwindSafe for TaskRegistry
impl Send for TaskRegistry
impl Sync for TaskRegistry
impl Unpin for TaskRegistry
impl UnsafeUnpin for TaskRegistry
impl !UnwindSafe for TaskRegistry
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