Struct pd_client::RpcClient [−][src]
Fields
cluster_id: u64
pd_client: Arc<Client>
monitor: Arc<ThreadPool<TaskCell>>
Implementations
impl RpcClient
[src][−]
pub fn new(
cfg: &Config,
shared_env: Option<Arc<Environment>>,
security_mgr: Arc<SecurityManager>
) -> Result<RpcClient>
[src]
cfg: &Config,
shared_env: Option<Arc<Environment>>,
security_mgr: Arc<SecurityManager>
) -> Result<RpcClient>
pub async fn new_async(
cfg: &Config,
shared_env: Option<Arc<Environment>>,
security_mgr: Arc<SecurityManager>
) -> Result<RpcClient>
[src]
cfg: &Config,
shared_env: Option<Arc<Environment>>,
security_mgr: Arc<SecurityManager>
) -> Result<RpcClient>
fn header(&self) -> RequestHeader
[src][−]
Creates a new request header.
pub fn get_leader(&self) -> Member
[src][−]
Gets the leader of PD.
pub fn reconnect(&self) -> Result<()>
[src][−]
Re-establishes connection with PD leader in synchronized fashion.
fn call_option(client: &Client) -> CallOption
[src][−]
Creates a new call option with default request timeout.
fn get_region_and_leader(&self, key: &[u8]) -> PdFuture<(Region, Option<Peer>)>
[src][−]
Gets given key’s Region and Region’s leader from PD.
fn get_store_and_stats(&self, store_id: u64) -> PdFuture<(Store, StoreStats)>
[src]
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for RpcClient
impl Send for RpcClient
impl Sync for RpcClient
impl Unpin for RpcClient
impl !UnwindSafe for RpcClient
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T> Instrument for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> Pointable for T
[src][+]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src][+]
V: MultiLane<T>,