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. Stdout / stderr are captured
line-by-line and written to Scribe structured logs under
$SCRIBE_LOG_DIR/{tag}.log (tag = std_name, e.g.
"com.robonix.service.mapping"). Lines are NOT forwarded to the
terminal — rbnx boot owns the display and raw package output would
drown out the boot progress lines. Use rbnx logs -f for live
per-package log tailing.
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 has_process_record(&self, std_name: &str, package_type: &str) -> bool
pub fn has_process_record(&self, std_name: &str, package_type: &str) -> bool
Return whether start_process has inserted the in-memory runtime
record, without re-validating the child’s current command line.
This is a narrow spawn-synchronization primitive for callers that run
lifecycle supervision alongside start_process. A valid package start
body may exec into Docker or another launcher immediately, so the
stricter persisted-record identity check used by Self::is_running
is intentionally not appropriate during this short hand-off window.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].