pub struct BrokerManager { /* private fields */ }Expand description
Broker manager
Implementations§
Source§impl BrokerManager
impl BrokerManager
Sourcepub fn new(config: Arc<ControllerConfig>) -> Self
pub fn new(config: Arc<ControllerConfig>) -> Self
Create a new broker manager
Sourcepub async fn register(&self, info: BrokerInfo) -> Result<()>
pub async fn register(&self, info: BrokerInfo) -> Result<()>
Register a broker
Sourcepub async fn unregister(&self, broker_name: &str) -> Result<()>
pub async fn unregister(&self, broker_name: &str) -> Result<()>
Unregister a broker
Sourcepub async fn get_broker(&self, broker_name: &str) -> Result<BrokerInfo>
pub async fn get_broker(&self, broker_name: &str) -> Result<BrokerInfo>
Get broker information
Sourcepub async fn list_brokers(&self) -> Vec<BrokerInfo>
pub async fn list_brokers(&self) -> Vec<BrokerInfo>
List all brokers
Sourcepub async fn list_brokers_by_cluster(
&self,
cluster_name: &str,
) -> Vec<BrokerInfo>
pub async fn list_brokers_by_cluster( &self, cluster_name: &str, ) -> Vec<BrokerInfo>
List brokers by cluster
Auto Trait Implementations§
impl Freeze for BrokerManager
impl !RefUnwindSafe for BrokerManager
impl Send for BrokerManager
impl Sync for BrokerManager
impl Unpin for BrokerManager
impl !UnwindSafe for BrokerManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more