use crate::{
ClusterClient, ConsumerGroupClient, ConsumerOffsetClient, MessageClient, PartitionClient,
PersonalAccessTokenClient, SegmentClient, StreamClient, SystemClient, TopicClient, UserClient,
};
use crate::{DiagnosticEvent, IggyError};
use async_broadcast::Receiver;
use async_trait::async_trait;
use std::fmt::Debug;
#[async_trait]
pub trait Client:
ClusterClient
+ SystemClient
+ UserClient
+ PersonalAccessTokenClient
+ StreamClient
+ TopicClient
+ PartitionClient
+ SegmentClient
+ MessageClient
+ ConsumerOffsetClient
+ ConsumerGroupClient
+ Sync
+ Send
+ Debug
{
async fn connect(&self) -> Result<(), IggyError>;
async fn disconnect(&self) -> Result<(), IggyError>;
async fn shutdown(&self) -> Result<(), IggyError>;
async fn subscribe_events(&self) -> Receiver<DiagnosticEvent>;
}