pub struct AdminServiceClient<T> { /* private fields */ }Expand description
Hosted by server-zd; operators call these RPCs through dexcli.
Implementations§
Source§impl<T> AdminServiceClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> AdminServiceClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdminServiceClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<Body>, Response = Response<<T as GrpcService<Body>>::ResponseBody>>,
<T as Service<Request<Body>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn describe_active_node(
&mut self,
request: impl IntoRequest<DescribeActiveNodeRequest>,
) -> Result<Response<DescribeActiveNodeResponse>, Status>
pub async fn describe_active_node( &mut self, request: impl IntoRequest<DescribeActiveNodeRequest>, ) -> Result<Response<DescribeActiveNodeResponse>, Status>
Returns the node ID, node epoch, and lease holder of the active Server process.
The process that receives the call answers from the node lease it holds. It fails with FailedPrecondition when it is not the active process, for example while it starts, stands by, or steps down, or while no process holds the lease during a hold-off. Wait past the hold-off and call again. The call changes nothing, so it is safe to retry.
Sourcepub async fn step_down_active_node(
&mut self,
request: impl IntoRequest<StepDownActiveNodeRequest>,
) -> Result<Response<StepDownActiveNodeResponse>, Status>
pub async fn step_down_active_node( &mut self, request: impl IntoRequest<StepDownActiveNodeRequest>, ) -> Result<Response<StepDownActiveNodeResponse>, Status>
Makes the active Server process of a node ID give up its node lease.
The active process stops serving and waits, within a bound, for in-flight commits. It then releases the node lease and stays running as a standby process. It waits for lease_reacquisition_hold_off before it competes for the lease again, so another standby process of the same node ID can take over first. If none does, it takes the lease back with a new node epoch.
After the release, the call watches the node lease. It returns as soon as another process takes over. Otherwise it returns after the hold-off and one attempt by this process to take the lease back. The call therefore lasts at most the commit drain bound, the release, the hold-off, and one lease acquisition attempt. The response names the process that holds the lease, or says that neither case was confirmed within that bound.
Without a precondition, a call steps down whichever process is active when it arrives, so a blind retry can step down the process that just took over. Call DescribeActiveNode first and set expected_node_id and expected_node_epoch to the values it returned. Keep those values for any retry.
Trait Implementations§
Source§impl<T: Clone> Clone for AdminServiceClient<T>
impl<T: Clone> Clone for AdminServiceClient<T>
Auto Trait Implementations§
impl<T> !Freeze for AdminServiceClient<T>
impl<T> Forget for AdminServiceClient<T>
impl<T> RefUnwindSafe for AdminServiceClient<T>where
Grpc<T>: RefUnwindSafe,
impl<T> Send for AdminServiceClient<T>
impl<T> Sync for AdminServiceClient<T>
impl<T> Unpin for AdminServiceClient<T>
impl<T> UnsafeUnpin for AdminServiceClient<T>where
Grpc<T>: UnsafeUnpin,
impl<T> UnwindSafe for AdminServiceClient<T>where
Grpc<T>: UnwindSafe,
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
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>
T in a tonic::Request