README

Lfan-ke/raft-moonbit/quorum does not have a README file

#
VoteState

pub(all) enum VoteState {
VoteWon
VoteLost
VotePending
} derive(Eq)

The outcome of counting votes against a configuration: still pending (no majority either way), won (a majority granted), or lost (a majority denied).

#
committed_index

fn committed_index(cfg : Array[String], cfgj : Array[String], acked : Map[String, UInt64]) -> UInt64

The committed index of a (possibly joint) configuration. cfg is the incoming half and cfgj the outgoing half; an empty half is the zero quorum. A joint configuration can only commit an index that both halves' majorities agree on, so the result is the smaller of the two (Raft ยง6).

#
describe

fn describe(voters : Array[String], acked : Map[String, UInt64]) -> String

A multi-line ASCII bar chart of each voter's acknowledged index (etcd's MajorityConfig.Describe), longest bar for the highest index. Diagnostics only โ€” it has no bearing on consensus, but makes a quorum's commit state legible in a dump.

#
vote_result

fn vote_result(cfg : Array[String], cfgj : Array[String], votes : Map[String, Bool]) -> VoteState

The vote outcome for a (possibly joint) configuration. A joint vote is won only when both halves win, lost as soon as either half loses, and pending otherwise โ€” the discipline that keeps a membership change from splitting the cluster's decision (Raft ยง6).

Source Files

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

ยฉ 2026 mooncakes.io