API Reference raft_ex v#0.1.0

View Source

Modules

Primary module for interacting with RaftEx servers and clusters.

High-level API for managing distributed RaftEx clusters.

Convenience helpers for bootstrapping distributed RaftEx clusters across multiple Elixir nodes.

Thin wrapper around the :seshat counter library.

Helpers for setting up distributed Erlang for RaftEx clusters.

In-memory leaderboard for tracking Raft cluster leaders across nodes.

Exponential-decay leaky integrator for rate estimation.

General-purpose utilities used across the RaftEx codebase.

Persistent replicated Raft log.

Initialises the ETS tables used by the WAL and segment reader layer.

Durable metadata store for Raft servers: current_term, voted_for, and last_applied.

Temporary barrier process that allows the log supervisor's children to signal when they are ready for writes.

Background process that manages immutable segment files for long-term log storage.

Write-ahead log process for RaftEx.

Supervisor for the WAL (Write-Ahead Log) and its helper processes.

Behaviour for RaftEx state machines.

Handles distributed RPC communication between Raft nodes across the cluster.

Seed-based node discovery for RaftEx clusters.

Monitors cluster node connectivity and notifies Raft server processes of node up/down events.

Sparse sequence representation (ordered high→low).

Core Raft server logic: leader election, log replication, and state machine application.

Helpers for managing the cluster membership map inside a server state.

Immutable per-server configuration record.

Pure helpers for building and combining Raft effect lists.

Raft leader election implementation with pre-vote support.

RPC handler for Raft consensus protocol messages.

Gen_statem process managing a RaftEx server lifecycle. This is a partial implementation showing the structure. Full implementation would mirror ra_server_proc.erl closely.

Dynamic supervisor that owns one RaftEx.ServerSupervisor per server that has been started on this node.

Shared type definitions and protocol message structs for the Raft implementation.

Follower → leader: response to an AppendEntries RPC.

Leader → follower: replicate log entries (or heartbeat when entries: []).

Follower response to a HeartbeatRpc.

Lightweight heartbeat used for consistent query acknowledgement.

Response to an InfoRpc.

Generic info request between peers.

Follower → leader: snapshot installation result.

Leader → follower: transfer a snapshot.

Peer → pre-vote candidate: pre-vote result.

Pre-vote probe to check whether an election would succeed.

Peer → candidate: vote grant/deny.

Candidate → peers: request a vote in an election.

Mix Tasks

Manage RaftEx distributed clusters.