use crate::prelude::IggyClient;
use async_trait::async_trait;
use iggy_common::PartitionClient;
use iggy_common::locking::IggyRwLockFn;
use iggy_common::{Identifier, IggyError};
#[async_trait]
impl PartitionClient for IggyClient {
async fn create_partitions(
&self,
stream_id: &Identifier,
topic_id: &Identifier,
partitions_count: u32,
) -> Result<(), IggyError> {
self.client
.read()
.await
.create_partitions(stream_id, topic_id, partitions_count)
.await
}
async fn delete_partitions(
&self,
stream_id: &Identifier,
topic_id: &Identifier,
partitions_count: u32,
) -> Result<(), IggyError> {
self.client
.read()
.await
.delete_partitions(stream_id, topic_id, partitions_count)
.await
}
}