pub struct TopicManager { /* private fields */ }Expand description
Topic manager
Implementations§
Source§impl TopicManager
impl TopicManager
Sourcepub fn new(config: Arc<ControllerConfig>) -> Self
pub fn new(config: Arc<ControllerConfig>) -> Self
Create a new topic manager
Sourcepub async fn create_topic(&self, config: TopicConfig) -> Result<()>
pub async fn create_topic(&self, config: TopicConfig) -> Result<()>
Create a topic from config
Sourcepub async fn update_topic(&self, config: TopicConfig) -> Result<()>
pub async fn update_topic(&self, config: TopicConfig) -> Result<()>
Update a topic from config
Sourcepub async fn create_or_update_topic(&self, info: TopicInfo) -> Result<()>
pub async fn create_or_update_topic(&self, info: TopicInfo) -> Result<()>
Create or update a topic
Sourcepub async fn delete_topic(&self, topic_name: &str) -> Result<()>
pub async fn delete_topic(&self, topic_name: &str) -> Result<()>
Delete a topic
Sourcepub async fn list_topics(&self) -> Vec<TopicInfo>
pub async fn list_topics(&self) -> Vec<TopicInfo>
List all topics
Sourcepub async fn list_topics_by_broker(&self, broker_name: &str) -> Vec<TopicInfo>
pub async fn list_topics_by_broker(&self, broker_name: &str) -> Vec<TopicInfo>
List topics by broker
Auto Trait Implementations§
impl Freeze for TopicManager
impl !RefUnwindSafe for TopicManager
impl Send for TopicManager
impl Sync for TopicManager
impl Unpin for TopicManager
impl !UnwindSafe for TopicManager
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