[][src]Enum raftlog::Event

pub enum Event {
    RoleChanged {
        new_role: Role,
    },
    TermChanged {
        new_ballot: Ballot,
    },
    NewLeaderElected,
    Committed {
        index: LogIndex,
        entry: LogEntry,
    },
    SnapshotLoaded {
        new_head: LogPosition,
        snapshot: Vec<u8>,
    },
    SnapshotInstalled {
        new_head: LogPosition,
    },
}

ReplicatedLogから発生するイベント一覧.

Variants

RoleChanged

ローカルノードの役割が変わった.

Fields of RoleChanged

new_role: Role
TermChanged

新しい選挙期間に移った.

Fields of TermChanged

new_ballot: Ballot
NewLeaderElected

新しいリーダーが選出された.

Committed

新しいログエントリがコミットされた.

エントリの内容がコマンドの場合には、 ReplicatedLogの利用者は、自身が管理する状態機械に、 commandを適用する必要がある.

ログエントリはインデックスの昇順でコミットされ, インデックスは常に一ずつ増加する.

Fields of Committed

index: LogIndexentry: LogEntry
SnapshotLoaded

スナップショットがロードされた.

ReplicatedLogの利用者は、自身が管理する状態機械を、 snapshotの状態にリセットする必要がある.

Fields of SnapshotLoaded

new_head: LogPositionsnapshot: Vec<u8>
SnapshotInstalled

スナップショットのインストールが行われた.

もしnew_headの位置が、最新のコミット済み地点よりも 新しい場合には、これとは別にSnapshotLoadedイベントが発行される.

Fields of SnapshotInstalled

new_head: LogPosition

Trait Implementations

impl Debug for Event[src]

impl Eq for Event[src]

impl PartialEq<Event> for Event[src]

impl StructuralEq for Event[src]

impl StructuralPartialEq for Event[src]

Auto Trait Implementations

impl RefUnwindSafe for Event

impl Send for Event

impl Sync for Event

impl Unpin for Event

impl UnwindSafe for Event

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<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.