Struct test_raftstore::TestPdClient[][src]

pub struct TestPdClient {
    cluster_id: u64,
    cluster: Arc<RwLock<Cluster>>,
    timer: Handle,
    is_incompatible: bool,
    tso: AtomicU64,
    trigger_tso_failure: AtomicBool,
    feature_gate: FeatureGate,
}

Fields

cluster_id: u64cluster: Arc<RwLock<Cluster>>timer: Handleis_incompatible: booltso: AtomicU64trigger_tso_failure: AtomicBoolfeature_gate: FeatureGate

Implementations

impl TestPdClient[src]

pub fn new(cluster_id: u64, is_incompatible: bool) -> TestPdClient[src]

pub fn get_stores(&self) -> Result<Vec<Store>>[src]

fn check_bootstrap(&self) -> Result<()>[src]

fn is_regions_empty(&self) -> bool[src]

fn schedule_operator(&self, region_id: u64, op: Operator)[src]

pub fn get_region_epoch(&self, region_id: u64) -> RegionEpoch[src]

pub fn get_regions_number(&self) -> usize[src]

pub fn disable_default_operator(&self)[src]

pub fn enable_default_operator(&self)[src]

pub fn must_have_peer(&self, region_id: u64, peer: Peer)[src]

pub fn must_none_peer(&self, region_id: u64, peer: Peer)[src]

pub fn must_none_pending_peer(&self, peer: Peer)[src]

pub fn must_finish_joint_confchange(
    &self,
    region_id: u64,
    add_peers: Vec<Peer>,
    remove_peers: Vec<Peer>
)
[src]

pub fn must_not_in_joint(&self, region_id: u64)[src]

pub fn add_region(&self, region: &Region)[src]

pub fn transfer_leader(&self, region_id: u64, peer: Peer)[src]

pub fn add_peer(&self, region_id: u64, peer: Peer)[src]

pub fn remove_peer(&self, region_id: u64, peer: Peer)[src]

pub fn joint_confchange(
    &self,
    region_id: u64,
    changes: Vec<(ConfChangeType, Peer)>
) -> (Vec<Peer>, Vec<Peer>)
[src]

pub fn leave_joint(&self, region_id: u64)[src]

pub fn is_in_joint(&self, region_id: u64) -> bool[src]

pub fn split_region(
    &self,
    region: Region,
    policy: CheckPolicy,
    keys: Vec<Vec<u8>>
)
[src]

pub fn must_split_region(
    &self,
    region: Region,
    policy: CheckPolicy,
    keys: Vec<Vec<u8>>
)
[src]

pub fn must_add_peer(&self, region_id: u64, peer: Peer)[src]

pub fn must_remove_peer(&self, region_id: u64, peer: Peer)[src]

pub fn must_joint_confchange(
    &self,
    region_id: u64,
    changes: Vec<(ConfChangeType, Peer)>
)
[src]

pub fn must_leave_joint(&self, region_id: u64)[src]

pub fn merge_region(&self, from: u64, target: u64)[src]

pub fn must_merge(&self, from: u64, target: u64)[src]

pub fn check_merged(&self, from: u64) -> bool[src]

pub fn check_merged_timeout(&self, from: u64, duration: Duration)[src]

pub fn region_leader_must_be(&self, region_id: u64, peer: Peer)[src]

pub fn check_split(&self, region: &Region, split_key: &[u8]) -> bool[src]

pub fn get_store_stats(&self, store_id: u64) -> Option<StoreStats>[src]

pub fn get_split_count(&self) -> usize[src]

pub fn get_down_peers(&self) -> HashMap<u64, PeerStats>[src]

pub fn get_pending_peers(&self) -> HashMap<u64, Peer>[src]

pub fn set_bootstrap(&self, is_bootstraped: bool)[src]

pub fn configure_dr_auto_sync(&self, label_key: &str)[src]

pub fn switch_replication_mode(&self, state: DrAutoSyncState)[src]

pub fn region_replication_status(
    &self,
    region_id: u64
) -> RegionReplicationStatus
[src]

pub fn get_region_approximate_size(&self, region_id: u64) -> Option<u64>[src]

pub fn get_region_approximate_keys(&self, region_id: u64) -> Option<u64>[src]

pub fn get_region_last_report_ts(&self, region_id: u64) -> Option<UnixSecs>[src]

pub fn get_region_last_report_term(&self, region_id: u64) -> Option<u64>[src]

pub fn get_store_hotspots(
    &self,
    store_id: u64
) -> Option<HashMap<u64, PeerStat>>
[src]

pub fn set_gc_safe_point(&self, safe_point: u64)[src]

pub fn trigger_tso_failure(&self)[src]

pub fn shutdown_store(&self, store_id: u64)[src]

pub fn ignore_merge_target_integrity(&self)[src]

pub fn set_tso(&self, ts: TimeStamp)[src]

pub fn reset_version(&self, version: &str)[src]

Trait Implementations

impl PdClient for TestPdClient[src]

Auto Trait Implementations

impl !RefUnwindSafe for TestPdClient

impl Send for TestPdClient

impl Sync for TestPdClient

impl Unpin for TestPdClient

impl !UnwindSafe for TestPdClient

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<V, W> ConvertFrom<W> for V where
    W: ConvertTo<V>, 
[src]

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]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]