Struct paxakos::Shell [−][src]
pub struct Shell<N: NodeImpl> { /* fields omitted */ }
Expand description
The Node
implementation that’s returned from
NodeBuilder
s.
This Node
implementation processes requests from NodeHandle
s. It
delegates to the outermost Decoration
,
thus giving decorations a chance to intercept.
Trait Implementations
type Invocation = InvocationOf<N>
type Invocation = InvocationOf<N>
Parametrization of the paxakos algorithm.
type Communicator = CommunicatorOf<N>
type Communicator = CommunicatorOf<N>
Type of communicator this node uses.
type Shutdown = ShutdownOf<N>
type Shutdown = ShutdownOf<N>
Type that will perform graceful shutdown if requsted.
Node’s current status.
Node’s current mode of participation.
Polls the node’s event stream. Read more
fn prepare_snapshot(
&self
) -> LocalBoxFuture<'static, Result<SnapshotFor<Self>, PrepareSnapshotError>>
fn prepare_snapshot(
&self
) -> LocalBoxFuture<'static, Result<SnapshotFor<Self>, PrepareSnapshotError>>
Requests that snapshot of the node’s current state be taken.
fn affirm_snapshot(
&self,
snapshot: SnapshotFor<Self>
) -> LocalBoxFuture<'static, Result<(), AffirmSnapshotError>>
fn affirm_snapshot(
&self,
snapshot: SnapshotFor<Self>
) -> LocalBoxFuture<'static, Result<(), AffirmSnapshotError>>
Affirms that the given snapshot was written to persistent storage. Read more
fn install_snapshot(
&self,
snapshot: SnapshotFor<Self>
) -> LocalBoxFuture<'static, Result<(), InstallSnapshotError>>
fn install_snapshot(
&self,
snapshot: SnapshotFor<Self>
) -> LocalBoxFuture<'static, Result<(), InstallSnapshotError>>
Requests that given snapshot be installed.
Reads the node’s current state. Read more
fn append<A, P, R>(
&self,
applicable: A,
args: P
) -> LocalBoxFuture<'_, AppendResultFor<Self, A, R>> where
A: ApplicableTo<StateOf<Self>> + 'static,
P: Into<AppendArgs<Self::Invocation, R>>,
R: RetryPolicy<Invocation = Self::Invocation>,
fn append<A, P, R>(
&self,
applicable: A,
args: P
) -> LocalBoxFuture<'_, AppendResultFor<Self, A, R>> where
A: ApplicableTo<StateOf<Self>> + 'static,
P: Into<AppendArgs<Self::Invocation, R>>,
R: RetryPolicy<Invocation = Self::Invocation>,
Appends applicable
to the shared log.
fn append_static<A, P, R>(
&self,
applicable: A,
args: P
) -> LocalBoxFuture<'static, StaticAppendResultFor<Self, A, R>> where
A: ApplicableTo<StateOf<Self>> + 'static,
P: Into<AppendArgs<Self::Invocation, R>>,
R: RetryPolicy<Invocation = Self::Invocation>,
R::StaticError: From<ShutDownOr<R::Error>>,
fn append_static<A, P, R>(
&self,
applicable: A,
args: P
) -> LocalBoxFuture<'static, StaticAppendResultFor<Self, A, R>> where
A: ApplicableTo<StateOf<Self>> + 'static,
P: Into<AppendArgs<Self::Invocation, R>>,
R: RetryPolicy<Invocation = Self::Invocation>,
R::StaticError: From<ShutDownOr<R::Error>>,
Appends applicable
to the shared log.
Auto Trait Implementations
impl<N> !RefUnwindSafe for Shell<N>
impl<N> !UnwindSafe for Shell<N>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more