pub struct ProcessManager { /* private fields */ }Expand description
Manager for processes running capabilities and skills
Implementations§
Source§impl ProcessManager
impl ProcessManager
pub fn new(log_dir: PathBuf) -> Result<Self>
pub fn get_hostname(&self) -> &str
Sourcepub async fn start_process(
&self,
_package_name: &str,
std_name: &str,
package_type: &str,
package_path: &Path,
start_script: &str,
) -> Result<ProcessStartResult>
pub async fn start_process( &self, _package_name: &str, std_name: &str, package_type: &str, package_path: &Path, start_script: &str, ) -> Result<ProcessStartResult>
Start a process; blocks until it exits. Output goes to terminal (no log file for now).
Sourcepub fn get_running_processes(&self) -> Vec<ProcessInfo>
pub fn get_running_processes(&self) -> Vec<ProcessInfo>
Get all running processes
Sourcepub fn is_running(&self, std_name: &str, package_type: &str) -> bool
pub fn is_running(&self, std_name: &str, package_type: &str) -> bool
Check if a process is running
Sourcepub fn get_process_tree(pid: u32) -> Result<ProcessTreeNode>
pub fn get_process_tree(pid: u32) -> Result<ProcessTreeNode>
Get process tree structure (parent-child relationships)
Sourcepub async fn stop_process(
&self,
std_name: &str,
package_type: &str,
) -> Result<ProcessStopResult>
pub async fn stop_process( &self, std_name: &str, package_type: &str, ) -> Result<ProcessStopResult>
Stop a specific process
Auto Trait Implementations§
impl Freeze for ProcessManager
impl RefUnwindSafe for ProcessManager
impl Send for ProcessManager
impl Sync for ProcessManager
impl Unpin for ProcessManager
impl UnsafeUnpin for ProcessManager
impl UnwindSafe for ProcessManager
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