Struct test_raftstore::NodeCluster[][src]

pub struct NodeCluster {
    trans: ChannelTransport,
    pd_client: Arc<TestPdClient>,
    nodes: HashMap<u64, Node<TestPdClient, RocksEngine>>,
    snap_mgrs: HashMap<u64, SnapManager>,
    simulate_trans: HashMap<u64, SimulateTransport<ChannelTransport>>,
    concurrency_managers: HashMap<u64, ConcurrencyManager>,
    post_create_coprocessor_host: Option<Box<dyn Fn(u64, &mut CoprocessorHost<RocksEngine>)>>,
}

Fields

trans: ChannelTransportpd_client: Arc<TestPdClient>nodes: HashMap<u64, Node<TestPdClient, RocksEngine>>snap_mgrs: HashMap<u64, SnapManager>simulate_trans: HashMap<u64, SimulateTransport<ChannelTransport>>concurrency_managers: HashMap<u64, ConcurrencyManager>post_create_coprocessor_host: Option<Box<dyn Fn(u64, &mut CoprocessorHost<RocksEngine>)>>

Implementations

impl NodeCluster[src]

pub fn new(pd_client: Arc<TestPdClient>) -> NodeCluster[src]

impl NodeCluster[src]

pub fn get_node_router(
    &self,
    node_id: u64
) -> SimulateTransport<ServerRaftStoreRouter<RocksEngine, RocksEngine>>
[src]

pub fn post_create_coprocessor_host(
    &mut self,
    op: Box<dyn Fn(u64, &mut CoprocessorHost<RocksEngine>)>
)
[src]

pub fn get_node(
    &mut self,
    node_id: u64
) -> Option<&mut Node<TestPdClient, RocksEngine>>
[src]

pub fn get_concurrency_manager(&self, node_id: u64) -> ConcurrencyManager[src]

Trait Implementations

impl Simulator for NodeCluster[src]

Auto Trait Implementations

impl !RefUnwindSafe for NodeCluster

impl !Send for NodeCluster

impl !Sync for NodeCluster

impl Unpin for NodeCluster

impl !UnwindSafe for NodeCluster

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]