nodata 0.1.0

nodata is a kafka like message broker that is simple and easy to use, while relying on either local or s3 like data storage for consistency
use no_data_component_client::NoDataComponentClient;
use tonic::transport::Channel;

include!("gen/nodata.v1.rs");

pub struct GrpcComponentClient {
    host_name: String,
}

impl GrpcComponentClient {
    pub async fn new(host_name: impl Into<String>) -> anyhow::Result<Self> {
        Ok(Self {
            host_name: host_name.into(),
        })
    }

    pub async fn ping(&self) -> anyhow::Result<Option<()>> {
        self.create_client().await?.ping(PingRequest {}).await?;

        Ok(Some(()))
    }

    pub(crate) async fn create_client(&self) -> anyhow::Result<NoDataComponentClient<Channel>> {
        Ok(NoDataComponentClient::connect(self.host_name.clone()).await?)
    }
}