Raft v0.2.1 API Reference

Modules

Raft provides users with an api for building consistent (as defined by CAP), distributed state machines. It does this using the raft leader election and concensus protocol as described in the original paper

Defines the configuration for peer servers

Defines a struct and common operations for managing cluster membership

The Log module provides an api for all log operations. Since the log process is the only process that can access the underlying log store we cache several values in the log process state

Defines a log entry struct

This module defines the metadata for a raft node. This data is persisted to disk as described in the paper

The LogStore module provides a behaviour and high-level api for interacting with the underlying database engine. All values are encoded and decoded using :erlang.term_to_binary and :erlang.binary_to_term before they’re stored

A rocksdb implementation of the LogStore behaviour. At the moment we’re using 2 different databases: one for the logs and one for the metadata store

Defines multiple rpc commands and functions for broadcasting messages to other peers

The Server module provides the raft fsm

Defines a state struct and common operations for the internal state of the server process

This module provides a behaviour that can be implemented by clients to make use of the replicated log