pub struct RuntimeManager { /* private fields */ }Implementations§
Source§impl RuntimeManager
impl RuntimeManager
Sourcepub fn new<P: Into<PathBuf>>(berth_home: P) -> Self
pub fn new<P: Into<PathBuf>>(berth_home: P) -> Self
Creates a manager rooted at a Berth home directory.
Sourcepub fn status(&self, server: &str) -> Result<ServerStatus>
pub fn status(&self, server: &str) -> Result<ServerStatus>
Returns current persisted status for a server.
Sourcepub fn status_with_spec(
&self,
server: &str,
spec: Option<&ProcessSpec>,
) -> Result<ServerStatus>
pub fn status_with_spec( &self, server: &str, spec: Option<&ProcessSpec>, ) -> Result<ServerStatus>
Returns current persisted status for a server with optional restart spec.
Sourcepub fn start(&self, server: &str, spec: &ProcessSpec) -> Result<StartOutcome>
pub fn start(&self, server: &str, spec: &ProcessSpec) -> Result<StartOutcome>
Starts a server subprocess and records runtime state.
Sourcepub fn stop(&self, server: &str) -> Result<StopOutcome>
pub fn stop(&self, server: &str) -> Result<StopOutcome>
Stops a running server subprocess and records runtime state.
Sourcepub fn restart(&self, server: &str, spec: &ProcessSpec) -> Result<()>
pub fn restart(&self, server: &str, spec: &ProcessSpec) -> Result<()>
Restarts a server by stopping then starting with the same process spec.
Sourcepub fn run_supervisor(&self, server: &str, spec: &ProcessSpec) -> Result<()>
pub fn run_supervisor(&self, server: &str, spec: &ProcessSpec) -> Result<()>
Runs a tokio-backed supervision loop for one server until stopped.
Auto Trait Implementations§
impl Freeze for RuntimeManager
impl RefUnwindSafe for RuntimeManager
impl Send for RuntimeManager
impl Sync for RuntimeManager
impl Unpin for RuntimeManager
impl UnsafeUnpin for RuntimeManager
impl UnwindSafe for RuntimeManager
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