use super::{
lazy_broker_connection::LazyBrokerConnection, topic_leaders::TopicPartitionLeaders, Result,
};
use crate::{
clients::ClientConfig,
formats::Write,
models::{PartitionId, TopicName},
};
use futures::executor::block_on;
use std::{collections::HashMap, sync::Arc};
use tokio::sync::RwLock;
#[derive(Debug, Clone)]
pub struct ProducerClient {
leaders: TopicPartitionLeaders,
}
impl ProducerClient {
pub async fn create(config: ClientConfig) -> Result<Self> {
let leaders = TopicPartitionLeaders::create(config).await?;
Ok(ProducerClient { leaders })
}
pub async fn produce() -> Result<()> {
todo!()
}
}