use crate::{
ClientInfo, ClientInfoDetails, IggyDuration, IggyError, Snapshot, SnapshotCompression, Stats,
SystemSnapshotType,
};
use async_trait::async_trait;
#[async_trait]
pub trait SystemClient {
async fn get_stats(&self) -> Result<Stats, IggyError>;
async fn get_me(&self) -> Result<ClientInfoDetails, IggyError>;
async fn get_client(&self, client_id: u32) -> Result<Option<ClientInfoDetails>, IggyError>;
async fn get_clients(&self) -> Result<Vec<ClientInfo>, IggyError>;
async fn ping(&self) -> Result<(), IggyError>;
async fn heartbeat_interval(&self) -> IggyDuration;
async fn snapshot(
&self,
compression: SnapshotCompression,
snapshot_types: Vec<SystemSnapshotType>,
) -> Result<Snapshot, IggyError>;
}