[−][src]Struct overlord::overlord::Overlord
An overlord consensus instance.
Methods
impl<T, F, C, W> Overlord<T, F, C, W> where
T: Codec + Send + Sync + 'static,
F: Consensus<T> + 'static,
C: Crypto + Send + Sync + 'static,
W: Wal + 'static,
[src]
T: Codec + Send + Sync + 'static,
F: Consensus<T> + 'static,
C: Crypto + Send + Sync + 'static,
W: Wal + 'static,
pub fn new(address: Address, consensus: Arc<F>, crypto: C, wal: Arc<W>) -> Self
[src]
Create a new overlord and return an overlord instance with an unbounded receiver.
pub fn get_handler(&self) -> OverlordHandler<T>
[src]
Get the overlord handler from the overlord instance.
pub async fn run<'_>(
&'_ self,
interval: u64,
authority_list: Vec<Node>,
timer_config: Option<DurationConfig>
) -> ConsensusResult<()>
[src]
&'_ self,
interval: u64,
authority_list: Vec<Node>,
timer_config: Option<DurationConfig>
) -> ConsensusResult<()>
Run overlord consensus process. The interval
is the height interval as millisecond.
Auto Trait Implementations
impl<T, F, C, W> !RefUnwindSafe for Overlord<T, F, C, W>
impl<T, F, C, W> Send for Overlord<T, F, C, W> where
W: Send + Sync,
W: Send + Sync,
impl<T, F, C, W> Sync for Overlord<T, F, C, W> where
C: Sync,
W: Send + Sync,
C: Sync,
W: Send + Sync,
impl<T, F, C, W> Unpin for Overlord<T, F, C, W> where
C: Unpin,
C: Unpin,
impl<T, F, C, W> !UnwindSafe for Overlord<T, F, C, W>
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
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>,