pub struct ClusterClient { /* private fields */ }Expand description
Client for Cluster operations.
Implementations§
Source§impl ClusterClient
impl ClusterClient
Sourcepub async fn member_add(
&mut self,
urls: impl Into<Vec<String>>,
options: Option<MemberAddOptions>,
) -> Result<MemberAddResponse, Error>
pub async fn member_add( &mut self, urls: impl Into<Vec<String>>, options: Option<MemberAddOptions>, ) -> Result<MemberAddResponse, Error>
Adds a new member into the cluster.
Sourcepub async fn member_remove(
&mut self,
id: u64,
) -> Result<MemberRemoveResponse, Error>
pub async fn member_remove( &mut self, id: u64, ) -> Result<MemberRemoveResponse, Error>
Removes an existing member from the cluster.
Sourcepub async fn member_update(
&mut self,
id: u64,
url: impl Into<Vec<String>>,
) -> Result<MemberUpdateResponse, Error>
pub async fn member_update( &mut self, id: u64, url: impl Into<Vec<String>>, ) -> Result<MemberUpdateResponse, Error>
Updates the member configuration.
Sourcepub async fn member_list(&mut self) -> Result<MemberListResponse, Error>
pub async fn member_list(&mut self) -> Result<MemberListResponse, Error>
Lists all the members in the cluster.
Sourcepub async fn member_promote(
&mut self,
id: u64,
) -> Result<MemberPromoteResponse, Error>
pub async fn member_promote( &mut self, id: u64, ) -> Result<MemberPromoteResponse, Error>
Promotes a member from raft learner (non-voting) to raft voting member.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ClusterClient
impl !RefUnwindSafe for ClusterClient
impl !UnwindSafe for ClusterClient
impl Send for ClusterClient
impl Sync for ClusterClient
impl Unpin for ClusterClient
impl UnsafeUnpin 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request