pub struct BallistaCluster {
scheduler: String,
#[cfg(feature = "distributed")]
client: Option<ballista_client::BallistaClient>,
}
impl BallistaCluster {
pub fn new(scheduler: String) -> Self {
Self {
scheduler,
#[cfg(feature = "distributed")]
client: None,
}
}
#[cfg(feature = "distributed")]
pub async fn connect(&mut self) -> crate::error::Result<()> {
Err(crate::error::Error::NotImplemented("Ballista cluster connection will be implemented in the next phase".into()))
}
pub fn is_connected(&self) -> bool {
#[cfg(feature = "distributed")]
{
self.client.is_some()
}
#[cfg(not(feature = "distributed"))]
{
false
}
}
pub fn scheduler(&self) -> &str {
&self.scheduler
}
}