Struct raft::raw_node::RawNode[][src]

pub struct RawNode<T: Storage> {
    pub raft: Raft<T>,
    // some fields omitted
}

RawNode is a thread-unsafe Node. The methods of this struct correspond to the methods of Node and are described more fully there.

Fields

The internal raft state.

Methods

impl<T: Storage> RawNode<T>
[src]

Create a new RawNode given some Config and a list of Peers.

Tick advances the internal logical clock by a single tick.

Returns true to indicate that there will probably be some readiness which needs to be handled.

Campaign causes this RawNode to transition to candidate state.

Propose proposes data be appended to the raft log.

ProposeConfChange proposes a config change.

Takes the conf change and applies it.

Step advances the state machine using the given message.

Given an index, creates a new Ready value from that index.

Ready returns the current point-in-time state of this RawNode.

Given an index, can determine if there is a ready state from that time.

HasReady called when RawNode user need to check if any Ready pending. Checking logic in this method should be consistent with Ready.containsUpdates().

Grabs the snapshot from the raft if available.

Advance notifies the RawNode that the application has applied and saved progress in the last Ready results.

Appends and commits the ready value.

Advance apply to the passed index.

Status returns the current status of the given group.

ReportUnreachable reports the given node is not reachable for the last send.

ReportSnapshot reports the status of the sent snapshot.

TransferLeader tries to transfer leadership to the given transferee.

ReadIndex requests a read state. The read state will be set in ready. Read State has a read index. Once the application advances further than the read index, any linearizable read requests issued before the read request can be processed safely. The read state will have the same rctx attached.

Returns the store as an immutable reference.

Returns the store as a mutable reference.

Set whether skip broadcast empty commit messages at runtime.

Auto Trait Implementations

impl<T> Send for RawNode<T> where
    T: Send

impl<T> Sync for RawNode<T> where
    T: Sync