pub struct ClusterClient { /* private fields */ }Expand description
Client for interacting with a Rivven cluster
Implementations§
Source§impl ClusterClient
impl ClusterClient
Sourcepub fn with_config(config: ClusterClientConfig) -> Self
pub fn with_config(config: ClusterClientConfig) -> Self
Create a new cluster client with custom configuration
Sourcepub async fn ensure_topic(
&self,
endpoints: &[String],
topic_name: &str,
partitions: u32,
) -> Result<TopicInfo>
pub async fn ensure_topic( &self, endpoints: &[String], topic_name: &str, partitions: u32, ) -> Result<TopicInfo>
Create or ensure a topic exists in the cluster
Returns information about the topic including whether it already existed.
Sourcepub async fn delete_topic(
&self,
endpoints: &[String],
topic_name: &str,
) -> Result<()>
pub async fn delete_topic( &self, endpoints: &[String], topic_name: &str, ) -> Result<()>
Delete a topic from the cluster
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClusterClient
impl RefUnwindSafe for ClusterClient
impl Send for ClusterClient
impl Sync for ClusterClient
impl Unpin for ClusterClient
impl UnwindSafe for ClusterClient
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more