Struct vg_batteries::process::ProcessRunner
source · pub struct ProcessRunner {
pub worker_id: String,
pub should_restart: Mutex<bool>,
pub name: String,
pub cmdline: Cmdline,
pub current: Mutex<Option<Child>>,
pub stdout: Arc<Mutex<String>>,
pub stderr: Arc<Mutex<String>>,
pub tasks: Mutex<JoinSet<Result<()>>>,
}Available on
process only.Fields§
§worker_id: String§should_restart: Mutex<bool>§name: String§cmdline: Cmdline§current: Mutex<Option<Child>>§stdout: Arc<Mutex<String>>§stderr: Arc<Mutex<String>>§tasks: Mutex<JoinSet<Result<()>>>Implementations§
source§impl ProcessRunner
impl ProcessRunner
pub fn new(worker_id: String, name: String, cmdline: Cmdline) -> Result<Self>
pub async fn reap_orphans(name: String) -> Result<()>
pub async fn wait_until_stop(self: Arc<Self>) -> Result<()>
pub async fn start_and_loop(self: Arc<Self>) -> Result<()>
pub async fn disable_restart(&self) -> Result<()>
pub async fn stop(&self) -> Result<()>
pub async fn drain_tasks(&self)
pub async fn start(&self) -> Result<()>
pub async fn run_pipe_reader( process_name: String, pipe: impl AsyncRead + Unpin, data: Arc<Mutex<String>> ) -> Result<()>
pub async fn get_status(&self) -> Result<Value>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ProcessRunner
impl Send for ProcessRunner
impl Sync for ProcessRunner
impl Unpin for ProcessRunner
impl !UnwindSafe for ProcessRunner
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