pub struct RemoteBridgeManager { /* private fields */ }Expand description
Remote Bridge Manager
Provides a high-level interface for managing the remote control bridge.
Uses BridgeConfigProvider for configuration and AgentSpawner for
process creation, decoupled from CLI-specific types.
Implementations§
Source§impl RemoteBridgeManager
impl RemoteBridgeManager
Sourcepub fn new(
config_provider: Box<dyn BridgeConfigProvider>,
agent_spawner: Arc<dyn AgentSpawner>,
sessions_dir: PathBuf,
version: String,
attachment_dir: PathBuf,
) -> Self
pub fn new( config_provider: Box<dyn BridgeConfigProvider>, agent_spawner: Arc<dyn AgentSpawner>, sessions_dir: PathBuf, version: String, attachment_dir: PathBuf, ) -> Self
Create a new remote bridge manager
§Arguments
config_provider- Provides remote bridge configuration and API keysagent_spawner- Creates new agent processes on demandsessions_dir- Directory containing agent session filesversion- CLI version stringattachment_dir- Directory for storing received attachments
Sourcepub fn is_enabled(&self) -> Result<bool>
pub fn is_enabled(&self) -> Result<bool>
Check if remote control is enabled
Sourcepub async fn start_with_config(
&self,
config: BridgeConfig,
) -> Result<Option<JoinHandle<()>>>
pub async fn start_with_config( &self, config: BridgeConfig, ) -> Result<Option<JoinHandle<()>>>
Start the remote bridge with an explicit BridgeConfig
Returns Ok(Some(handle)) if started, Ok(None) if already running.
Sourcepub async fn start_from_config(&self) -> Result<Option<JoinHandle<()>>>
pub async fn start_from_config(&self) -> Result<Option<JoinHandle<()>>>
Start the remote bridge using configuration from the provider
Sourcepub async fn is_running(&self) -> bool
pub async fn is_running(&self) -> bool
Check if the bridge is running
Sourcepub fn status(&self) -> RemoteBridgeStatus
pub fn status(&self) -> RemoteBridgeStatus
Get bridge status for display (sync version)
Sourcepub async fn status_async(&self) -> RemoteBridgeStatus
pub async fn status_async(&self) -> RemoteBridgeStatus
Get bridge status for display (async version)
Auto Trait Implementations§
impl Freeze for RemoteBridgeManager
impl !RefUnwindSafe for RemoteBridgeManager
impl Send for RemoteBridgeManager
impl Sync for RemoteBridgeManager
impl Unpin for RemoteBridgeManager
impl UnsafeUnpin for RemoteBridgeManager
impl !UnwindSafe for RemoteBridgeManager
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