Struct test_pd::mocker::service::Service [−][src]
Fields
id_allocator: AtomicUsize
members_resp: Mutex<Option<GetMembersResponse>>
is_bootstrapped: AtomicBool
stores: Mutex<HashMap<u64, Store>>
regions: Mutex<HashMap<u64, Region>>
leaders: Mutex<HashMap<u64, Peer>>
feature_gate: Mutex<String>
Implementations
impl Service
[src]
pub fn new() -> Service
[src]
pub fn header() -> ResponseHeader
[src]
pub fn add_store(&self, store: Store)
[src]
Add an arbitrary store.
pub fn set_cluster_version(&self, version: String)
[src]
Trait Implementations
impl Debug for Service
[src]
impl PdMocker for Service
[src]
fn get_members(
&self,
_: &GetMembersRequest
) -> Option<Result<GetMembersResponse>>
[src]
&self,
_: &GetMembersRequest
) -> Option<Result<GetMembersResponse>>
fn bootstrap(&self, req: &BootstrapRequest) -> Option<Result<BootstrapResponse>>
[src]
fn is_bootstrapped(
&self,
_: &IsBootstrappedRequest
) -> Option<Result<IsBootstrappedResponse>>
[src]
&self,
_: &IsBootstrappedRequest
) -> Option<Result<IsBootstrappedResponse>>
fn alloc_id(&self, _: &AllocIdRequest) -> Option<Result<AllocIdResponse>>
[src]
fn get_store(&self, req: &GetStoreRequest) -> Option<Result<GetStoreResponse>>
[src]
fn get_all_stores(
&self,
req: &GetAllStoresRequest
) -> Option<Result<GetAllStoresResponse>>
[src]
&self,
req: &GetAllStoresRequest
) -> Option<Result<GetAllStoresResponse>>
fn get_region(
&self,
req: &GetRegionRequest
) -> Option<Result<GetRegionResponse>>
[src]
&self,
req: &GetRegionRequest
) -> Option<Result<GetRegionResponse>>
fn get_region_by_id(
&self,
req: &GetRegionByIdRequest
) -> Option<Result<GetRegionResponse>>
[src]
&self,
req: &GetRegionByIdRequest
) -> Option<Result<GetRegionResponse>>
fn region_heartbeat(
&self,
req: &RegionHeartbeatRequest
) -> Option<Result<RegionHeartbeatResponse>>
[src]
&self,
req: &RegionHeartbeatRequest
) -> Option<Result<RegionHeartbeatResponse>>
fn store_heartbeat(
&self,
_: &StoreHeartbeatRequest
) -> Option<Result<StoreHeartbeatResponse>>
[src]
&self,
_: &StoreHeartbeatRequest
) -> Option<Result<StoreHeartbeatResponse>>
fn ask_split(&self, _: &AskSplitRequest) -> Option<Result<AskSplitResponse>>
[src]
fn ask_batch_split(
&self,
_: &AskBatchSplitRequest
) -> Option<Result<AskBatchSplitResponse>>
[src]
&self,
_: &AskBatchSplitRequest
) -> Option<Result<AskBatchSplitResponse>>
fn report_batch_split(
&self,
_: &ReportBatchSplitRequest
) -> Option<Result<ReportBatchSplitResponse>>
[src]
&self,
_: &ReportBatchSplitRequest
) -> Option<Result<ReportBatchSplitResponse>>
fn scatter_region(
&self,
_: &ScatterRegionRequest
) -> Option<Result<ScatterRegionResponse>>
[src]
&self,
_: &ScatterRegionRequest
) -> Option<Result<ScatterRegionResponse>>
fn set_endpoints(&self, eps: Vec<String>)
[src]
fn get_operator(
&self,
_: &GetOperatorRequest
) -> Option<Result<GetOperatorResponse>>
[src]
&self,
_: &GetOperatorRequest
) -> Option<Result<GetOperatorResponse>>
fn put_store(&self, _: &PutStoreRequest) -> Option<Result<PutStoreResponse>>
[src]
fn get_cluster_config(
&self,
_: &GetClusterConfigRequest
) -> Option<Result<GetClusterConfigResponse>>
[src]
&self,
_: &GetClusterConfigRequest
) -> Option<Result<GetClusterConfigResponse>>
fn get_gc_safe_point(
&self,
_: &GetGcSafePointRequest
) -> Option<Result<GetGcSafePointResponse>>
[src]
&self,
_: &GetGcSafePointRequest
) -> Option<Result<GetGcSafePointResponse>>
fn tso(&self, _: &TsoRequest) -> Option<Result<TsoResponse>>
[src]
fn put_cluster_config(
&self,
_: &PutClusterConfigRequest
) -> Option<Result<PutClusterConfigResponse>>
[src]
&self,
_: &PutClusterConfigRequest
) -> Option<Result<PutClusterConfigResponse>>
fn update_gc_safe_point(
&self,
_: &UpdateGcSafePointRequest
) -> Option<Result<UpdateGcSafePointResponse>>
[src]
&self,
_: &UpdateGcSafePointRequest
) -> Option<Result<UpdateGcSafePointResponse>>
Auto Trait Implementations
impl RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl UnwindSafe for Service
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[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> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,