pub struct ZinitClient { /* private fields */ }
Expand description
Client for interacting with Zinit
Implementations§
Source§impl ZinitClient
impl ZinitClient
Sourcepub fn new(socket_path: impl AsRef<Path>) -> Self
pub fn new(socket_path: impl AsRef<Path>) -> Self
Create a new Zinit client with the default configuration
Sourcepub fn with_config(config: ClientConfig) -> Self
pub fn with_config(config: ClientConfig) -> Self
Create a new Zinit client with a custom configuration
Sourcepub async fn list(&self) -> Result<HashMap<String, ServiceState>>
pub async fn list(&self) -> Result<HashMap<String, ServiceState>>
List all services and their states
Sourcepub async fn status(&self, service: impl AsRef<str>) -> Result<ServiceStatus>
pub async fn status(&self, service: impl AsRef<str>) -> Result<ServiceStatus>
Get the status of a service
Sourcepub async fn kill(
&self,
service: impl AsRef<str>,
signal: impl AsRef<str>,
) -> Result<()>
pub async fn kill( &self, service: impl AsRef<str>, signal: impl AsRef<str>, ) -> Result<()>
Send a signal to a service
Sourcepub async fn logs(
&self,
follow: bool,
filter: Option<impl AsRef<str>>,
) -> Result<LogStream>
pub async fn logs( &self, follow: bool, filter: Option<impl AsRef<str>>, ) -> Result<LogStream>
Stream logs from services
Sourcepub async fn get_service(&self, service: impl AsRef<str>) -> Result<Value>
pub async fn get_service(&self, service: impl AsRef<str>) -> Result<Value>
Get raw service information
Trait Implementations§
Source§impl Clone for ZinitClient
impl Clone for ZinitClient
Source§fn clone(&self) -> ZinitClient
fn clone(&self) -> ZinitClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto 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