blueprint_qos/servers/
mod.rs

1pub mod common;
2pub mod grafana;
3pub mod loki;
4pub mod prometheus;
5
6use crate::error::Result;
7
8/// Common trait for server management
9pub trait ServerManager: Send + Sync {
10    /// Start the server
11    ///
12    /// # Errors
13    /// Returns an error if the server fails to start
14    async fn start(&self, network: Option<&str>, bind_ip: Option<String>) -> Result<()>;
15
16    /// Stop the server
17    ///
18    /// # Errors
19    /// Returns an error if the server fails to stop
20    async fn stop(&self) -> Result<()>;
21
22    /// Get the URL of the server
23    fn url(&self) -> String;
24
25    /// Check if the server is running
26    ///
27    /// # Errors
28    /// Returns an error if the check fails
29    async fn is_running(&self) -> Result<bool>;
30
31    /// Wait for the server to be ready
32    ///
33    /// # Errors
34    /// Returns an error if the server fails to become ready within the timeout
35    async fn wait_until_ready(&self, timeout_secs: u64) -> Result<()>;
36}