pub struct Pid1 { /* private fields */ }Expand description
Pid1 provides process supervision over processes specified by rc_conf and rc.d.
Implementations§
Source§impl Pid1
impl Pid1
Sourcepub fn new(options: Pid1Options) -> Result<Self, Error>
pub fn new(options: Pid1Options) -> Result<Self, Error>
Create a new Pid1 from the provided options.
Sourcepub fn shutdown(self) -> Result<(), Error>
pub fn shutdown(self) -> Result<(), Error>
Consume the pid1 and shut it down properly. First processes get the SIGTERM, then they get the SIGKILL. Will return only after all resources are reclaimed.
Sourcepub fn reconfigure(&self, options: Pid1Options) -> Result<(), Error>
pub fn reconfigure(&self, options: Pid1Options) -> Result<(), Error>
Reconfigure the Pid1 to use the new options. This will call reload after loading the new options.
Sourcepub fn reload(&self) -> Result<(), Error>
pub fn reload(&self) -> Result<(), Error>
Reload the configuration from the rc_conf and rc.d paths provided as of the last configuration.
Sourcepub fn kill(&self, target: Target, signal: Signal) -> Result<(), Error>
pub fn kill(&self, target: Target, signal: Signal) -> Result<(), Error>
Send the specified signal to all processes that match the target.
Sourcepub fn list_services(&self) -> Vec<String>
pub fn list_services(&self) -> Vec<String>
List the available services.
Sourcepub fn enabled_services(&self) -> Vec<String>
pub fn enabled_services(&self) -> Vec<String>
List the enabled services.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Pid1
impl !RefUnwindSafe for Pid1
impl Send for Pid1
impl Sync for Pid1
impl Unpin for Pid1
impl !UnwindSafe for Pid1
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