pub struct DaemonClient { /* private fields */ }Expand description
Daemon client for communicating with running Air daemon
Implementations§
Source§impl DaemonClient
impl DaemonClient
Sourcepub fn with_timeout(address: String, timeout_secs: u64) -> Self
pub fn with_timeout(address: String, timeout_secs: u64) -> Self
Create a new daemon client with custom timeout
Sourcepub fn execute_status(
&self,
_service: Option<String>,
) -> Result<StatusResponse, String>
pub fn execute_status( &self, _service: Option<String>, ) -> Result<StatusResponse, String>
Connect to daemon and execute status command
Sourcepub fn execute_restart(
&self,
service: Option<String>,
force: bool,
) -> Result<String, String>
pub fn execute_restart( &self, service: Option<String>, force: bool, ) -> Result<String, String>
Connect to daemon and execute restart command
Sourcepub fn execute_config_get(&self, key: &str) -> Result<ConfigResponse, String>
pub fn execute_config_get(&self, key: &str) -> Result<ConfigResponse, String>
Connect to daemon and execute config get command
Sourcepub fn execute_config_set(
&self,
key: &str,
value: &str,
) -> Result<String, String>
pub fn execute_config_set( &self, key: &str, value: &str, ) -> Result<String, String>
Connect to daemon and execute config set command
Sourcepub fn execute_config_reload(&self, validate: bool) -> Result<String, String>
pub fn execute_config_reload(&self, validate: bool) -> Result<String, String>
Connect to daemon and execute config reload command
Sourcepub fn execute_config_show(&self) -> Result<Value, String>
pub fn execute_config_show(&self) -> Result<Value, String>
Connect to daemon and execute config show command
Sourcepub fn execute_config_validate(
&self,
_path: Option<String>,
) -> Result<bool, String>
pub fn execute_config_validate( &self, _path: Option<String>, ) -> Result<bool, String>
Connect to daemon and execute config validate command
Sourcepub fn execute_metrics(
&self,
_service: Option<String>,
) -> Result<MetricsResponse, String>
pub fn execute_metrics( &self, _service: Option<String>, ) -> Result<MetricsResponse, String>
Connect to daemon and execute metrics command
Sourcepub fn execute_logs(
&self,
service: Option<String>,
_tail: Option<usize>,
_filter: Option<String>,
) -> Result<Vec<LogEntry>, String>
pub fn execute_logs( &self, service: Option<String>, _tail: Option<usize>, _filter: Option<String>, ) -> Result<Vec<LogEntry>, String>
Connect to daemon and execute logs command
Sourcepub fn execute_debug_dump_state(
&self,
_service: Option<String>,
) -> Result<DaemonState, String>
pub fn execute_debug_dump_state( &self, _service: Option<String>, ) -> Result<DaemonState, String>
Connect to daemon and execute debug dump-state command
Sourcepub fn execute_debug_dump_connections(
&self,
) -> Result<Vec<ConnectionInfo>, String>
pub fn execute_debug_dump_connections( &self, ) -> Result<Vec<ConnectionInfo>, String>
Connect to daemon and execute debug dump-connections command
Sourcepub fn execute_debug_health_check(
&self,
_service: Option<String>,
) -> Result<HealthCheckResponse, String>
pub fn execute_debug_health_check( &self, _service: Option<String>, ) -> Result<HealthCheckResponse, String>
Connect to daemon and execute debug health-check command
Sourcepub fn execute_debug_diagnostics(
&self,
level: DiagnosticLevel,
) -> Result<Value, String>
pub fn execute_debug_diagnostics( &self, level: DiagnosticLevel, ) -> Result<Value, String>
Connect to daemon and execute debug diagnostics command
Sourcepub fn is_daemon_running(&self) -> bool
pub fn is_daemon_running(&self) -> bool
Check if daemon is running
Auto Trait Implementations§
impl Freeze for DaemonClient
impl RefUnwindSafe for DaemonClient
impl Send for DaemonClient
impl Sync for DaemonClient
impl Unpin for DaemonClient
impl UnwindSafe for DaemonClient
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].