Raft v0.1.0 Raft
Link to this section Summary
Functions
Gets an entry from the log. This should only be used for testing purposes
Returns the leader according to the given peer
Reads state that has been applied to the state machine
Sets peers configuration. The new configuration will be merged with any existing configuration
Starts a new peer with a given Config.t
Returns the current status for a peer. This is used for debugging and testing purposes only
Gracefully stops the node
Creates a test cluster for running on a single. Should only be used for development and testing
Used to apply a new change to the application fsm. This is done in consistent manner. This operation blocks until the log has been replicated to a majority of servers
Link to this section Types
Link to this section Functions
get_entry(peer(), non_neg_integer()) :: {:ok, Raft.Log.Entry.t()} | {:error, term()}
Gets an entry from the log. This should only be used for testing purposes.
Returns the leader according to the given peer.
Reads state that has been applied to the state machine.
set_configuration(peer(), [peer()]) :: {:ok, Raft.Configuration.t()} | {:error, term()}
Sets peers configuration. The new configuration will be merged with any existing configuration.
start_node(peer(), Raft.Config.t()) :: {:ok, pid()} | {:error, term()}
Starts a new peer with a given Config.t.
Returns the current status for a peer. This is used for debugging and testing purposes only.
Gracefully stops the node.
Creates a test cluster for running on a single. Should only be used for development and testing.
Used to apply a new change to the application fsm. This is done in consistent manner. This operation blocks until the log has been replicated to a majority of servers.