pub struct ZinitClient { /* private fields */ }Expand description
Zinit RPC client
Implementations§
Source§impl ZinitClient
impl ZinitClient
Sourcepub fn try_default() -> Result<Self>
pub fn try_default() -> Result<Self>
Connect to default socket
pub async fn ping(&self) -> Result<PingResponse>
pub async fn shutdown(&self) -> Result<bool>
pub async fn reboot(&self) -> Result<bool>
pub async fn list(&self) -> Result<Vec<String>>
pub async fn status(&self, name: &str) -> Result<ServiceStatus>
pub async fn start(&self, name: &str) -> Result<bool>
pub async fn stop(&self, name: &str) -> Result<bool>
pub async fn restart(&self, name: &str) -> Result<bool>
pub async fn delete(&self, name: &str) -> Result<bool>
Sourcepub async fn reload(&self, name: &str) -> Result<bool>
pub async fn reload(&self, name: &str) -> Result<bool>
Reload a service from its YAML file on disk If the service is already monitored, it will be stopped and re-monitored
pub async fn kill(&self, name: &str, signal: &str) -> Result<bool>
pub async fn monitor(&self, name: &str, config: ServiceConfig) -> Result<bool>
pub async fn stats(&self, name: &str) -> Result<ServiceStats>
pub async fn is_running(&self, name: &str) -> Result<bool>
pub async fn start_all(&self) -> Result<bool>
pub async fn stop_all(&self) -> Result<bool>
pub async fn delete_all(&self) -> Result<bool>
pub async fn logs(&self) -> Result<Vec<String>>
pub async fn logs_filter(&self, service: &str) -> Result<Vec<String>>
pub async fn logs_tail(&self, n: u32) -> Result<Vec<String>>
pub async fn xinit_list(&self) -> Result<Vec<String>>
pub async fn xinit_register( &self, name: &str, listen: &[String], backend: &str, service: &str, idle_timeout: u64, connect_timeout: u64, ) -> Result<bool>
pub async fn xinit_unregister(&self, name: &str) -> Result<bool>
pub async fn xinit_status(&self, name: &str) -> Result<XinitStatus>
pub async fn xinit_status_all(&self) -> Result<Vec<XinitStatus>>
Sourcepub async fn register(&self, name: &str, config: ServiceConfig) -> Result<bool>
pub async fn register(&self, name: &str, config: ServiceConfig) -> Result<bool>
Register a service: save config to YAML file and monitor it
Sourcepub async fn get(&self, name: &str) -> Result<ServiceConfig>
pub async fn get(&self, name: &str) -> Result<ServiceConfig>
Get service configuration from YAML file on disk
Auto Trait Implementations§
impl Freeze for ZinitClient
impl RefUnwindSafe for ZinitClient
impl Send for ZinitClient
impl Sync for ZinitClient
impl Unpin for ZinitClient
impl UnwindSafe for ZinitClient
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