pub struct ProcessManager {
pub output_tx: Sender<OutputLine>,
/* private fields */
}Fields§
§output_tx: Sender<OutputLine>Implementations§
Source§impl ProcessManager
impl ProcessManager
pub fn new(session: &str) -> Self
pub async fn spawn_process( &mut self, command: &str, name: Option<String>, cwd: Option<&str>, env: Option<&HashMap<String, String>>, port: Option<u16>, ) -> Response
pub async fn stop_process(&mut self, target: &str) -> Response
pub async fn stop_all(&mut self) -> Response
pub async fn restart_process(&mut self, target: &str) -> Response
pub fn enable_proxy(&mut self)
pub fn status(&mut self) -> Response
Sourcepub fn is_process_exited(&mut self, target: &str) -> Option<Option<i32>>
pub fn is_process_exited(&mut self, target: &str) -> Option<Option<i32>>
Returns None if process not found or still running.
Returns Some(exit_code) if process has exited (exit_code is None for signal kills).
pub fn session_name(&self) -> &str
pub fn has_process(&self, target: &str) -> bool
Sourcepub fn running_ports(&self) -> HashMap<String, u16>
pub fn running_ports(&self) -> HashMap<String, u16>
Returns a map of running process names to their assigned ports.
Sourcepub fn status_snapshot(&self) -> Response
pub fn status_snapshot(&self) -> Response
Non-mutating status snapshot for use by the proxy status page.
May show stale exit states since it skips refresh_exit_states().
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
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