pub struct ProcessManager { /* private fields */ }Implementations§
Source§impl ProcessManager
impl ProcessManager
pub fn new() -> Self
Sourcepub async fn register(&self, config: ServiceConfig)
pub async fn register(&self, config: ServiceConfig)
Register a service from config (does not start it).
Sourcepub fn register_sync(&self, config: ServiceConfig)
pub fn register_sync(&self, config: ServiceConfig)
Sync version of register, callable from non-async contexts.
Sourcepub fn start_sync(&self, name: &str) -> Result<()>
pub fn start_sync(&self, name: &str) -> Result<()>
Sync version of start, callable from non-async contexts (e.g. JS ops).
Sourcepub async fn all_statuses(&self) -> HashMap<String, ServiceStatus>
pub async fn all_statuses(&self) -> HashMap<String, ServiceStatus>
Get status of all services.
pub fn all_statuses_sync(&self) -> HashMap<String, ServiceStatus>
Sourcepub async fn status(&self, name: &str) -> Option<ServiceStatus>
pub async fn status(&self, name: &str) -> Option<ServiceStatus>
Get status of one service.
pub fn status_sync(&self, name: &str) -> Option<ServiceStatus>
pub fn service_config_sync(&self, name: &str) -> Option<ServiceConfig>
pub async fn service_config(&self, name: &str) -> Option<ServiceConfig>
pub fn write_stdin_sync(&self, name: &str, input: &str) -> Result<()>
pub fn read_stdout_since_sync( &self, name: &str, offset: usize, ) -> Result<(usize, Vec<u8>)>
Sourcepub async fn start_auto(self: &Arc<Self>)
pub async fn start_auto(self: &Arc<Self>)
Start all services that have auto_start = true.
Sourcepub async fn run_health_checks(&self)
pub async fn run_health_checks(&self)
Run health checks for all services with health_url configured.
Trait Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§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