pub struct BridgeManager { /* private fields */ }Expand description
Manages bridge processes and their credentials.
Implementations§
Source§impl BridgeManager
impl BridgeManager
pub fn new() -> Self
Sourcepub fn new_with_agent_support(config: Config, memory: MemoryManager) -> Self
pub fn new_with_agent_support(config: Config, memory: MemoryManager) -> Self
Create a BridgeManager with agent support for handling chat/memory RPCs. This is used by the daemon when serving bridge CLI connections.
Sourcepub fn with_health_config(config: HealthCheckConfig) -> Self
pub fn with_health_config(config: HealthCheckConfig) -> Self
Create with custom health check configuration
Sourcepub fn start_health_checker(&self) -> JoinHandle<()>
pub fn start_health_checker(&self) -> JoinHandle<()>
Start the background health check task
Sourcepub async fn get_active_bridges(&self) -> Vec<BridgeStatus>
pub async fn get_active_bridges(&self) -> Vec<BridgeStatus>
Return status of all active bridge connections.
Sourcepub async fn register_bridge(
&self,
bridge_id: &str,
secret: &[u8],
) -> Result<()>
pub async fn register_bridge( &self, bridge_id: &str, secret: &[u8], ) -> Result<()>
Register a new bridge secret. Encrypts and saves to disk, and updates cache.
Sourcepub async fn get_credentials_for(
&self,
bridge_id: &str,
identity: &PeerIdentity,
) -> Result<Vec<u8>, BridgeError>
pub async fn get_credentials_for( &self, bridge_id: &str, identity: &PeerIdentity, ) -> Result<Vec<u8>, BridgeError>
Retrieve credentials if the identity is authorized. Loads from disk if not in cache.
Trait Implementations§
Source§impl Clone for BridgeManager
impl Clone for BridgeManager
Source§fn clone(&self) -> BridgeManager
fn clone(&self) -> BridgeManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BridgeManager
impl !RefUnwindSafe for BridgeManager
impl Send for BridgeManager
impl Sync for BridgeManager
impl Unpin for BridgeManager
impl UnsafeUnpin for BridgeManager
impl !UnwindSafe for BridgeManager
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> Erasable for T
impl<T> Erasable for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().