pub struct EdgeComputingManager { /* private fields */ }Expand description
Edge computing manager for distributed training
Implementations§
Source§impl EdgeComputingManager
impl EdgeComputingManager
Sourcepub fn new(config: EdgeComputingConfig) -> TorshResult<Self>
pub fn new(config: EdgeComputingConfig) -> TorshResult<Self>
Create a new edge computing manager
Sourcepub fn register_device(&self, device: EdgeDevice) -> TorshResult<()>
pub fn register_device(&self, device: EdgeDevice) -> TorshResult<()>
Register a new edge device
Sourcepub async fn discover_devices(&self) -> TorshResult<Vec<EdgeDevice>>
pub async fn discover_devices(&self) -> TorshResult<Vec<EdgeDevice>>
Discover available devices
Sourcepub fn select_clients(&self, round: usize) -> TorshResult<Vec<String>>
pub fn select_clients(&self, round: usize) -> TorshResult<Vec<String>>
Select clients for federated learning round
Sourcepub fn get_device(&self, device_id: &str) -> TorshResult<Option<EdgeDevice>>
pub fn get_device(&self, device_id: &str) -> TorshResult<Option<EdgeDevice>>
Get device information
Sourcepub fn get_all_devices(&self) -> TorshResult<Vec<EdgeDevice>>
pub fn get_all_devices(&self) -> TorshResult<Vec<EdgeDevice>>
Get all devices
Sourcepub fn update_device_status(
&self,
device_id: &str,
status: DeviceStatus,
) -> TorshResult<()>
pub fn update_device_status( &self, device_id: &str, status: DeviceStatus, ) -> TorshResult<()>
Update device status
Sourcepub async fn start_device_monitoring(&self) -> TorshResult<()>
pub async fn start_device_monitoring(&self) -> TorshResult<()>
Start device monitoring
Auto Trait Implementations§
impl Freeze for EdgeComputingManager
impl RefUnwindSafe for EdgeComputingManager
impl Send for EdgeComputingManager
impl Sync for EdgeComputingManager
impl Unpin for EdgeComputingManager
impl UnsafeUnpin for EdgeComputingManager
impl UnwindSafe for EdgeComputingManager
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> 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