# Functions
NewClock returns a instance of Clock with defaults set.
NewConfigDecoder returns a new instance of ConfigDecoder attached to a reader.
NewConfigEncoder returns a new instance of ConfigEncoder attached to a writer.
NewLog creates a new instance of Log with reasonable defaults.
NewLogEntryDecoder returns a new instance of the LogEntryDecoder that will decode from a reader.
NewLogEntryEncoder returns a new instance of the LogEntryEncoder that will encode to a writer.
# Constants
No description provided by the author
DefaultApplyInterval is the default time between checks to apply commands.
DefaultElectionTimeout is the default time before starting an election.
DefaultHeartbeatInterval is the default time to wait between heartbeats.
DefaultReconnectTimeout is the default time to wait before reconnecting.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WaitInterval represents the amount of time between checks to the applied index.
# Variables
ErrAlreadyVoted is returned when a vote has already been cast for a different candidate in the same election term.
ErrClosed is returned when the log is closed.
ErrDuplicateNodeID is returned when adding a node with an existing id.
ErrDuplicateNodeURL is returned when adding a node with an existing URL.
ErrInitialized is returned when initializing a log that is already a member of a cluster.
ErrInvalidNodeID is returned when using a node id of zero.
ErrLogExists is returned when initializing an already existing log.
ErrNodeNotFound is returned when referencing a non-existent node.
ErrNodeURLRequired is returned a node config has no URL set.
ErrNotLeader is returned performing leader operations on a non-leader.
ErrOpen is returned when opening a log that is already open.
ErrOutOfDateLog is returned when a candidate's log is not up to date.
ErrStaleTerm is returned when a term is before the current term.
ErrUncommittedIndex is returned when a stream is started from an uncommitted log index.
ErrURLRequired is returned when opening a log without a URL set.
# Structs
Clock implements an interface to the real-time clock.
Config represents the configuration for the log.
ConfigDecoder decodes a config from a reader.
ConfigEncoder encodes a config to a writer.
ConfigNode represents a single machine in the raft configuration.
Handler represents an HTTP endpoint for Raft to communicate over.
HTTPTransport represents a transport for sending RPCs over the HTTP protocol.
Log represents a replicated log of commands.
LogEntry represents a single command within the log.
LogEntryDecoder decodes entries from a reader.
LogEntryEncoder encodes entries to a writer.
# Interfaces
FSM represents the state machine that the log is applied to.
# Type aliases
LogEntryType serves as an internal marker for log entries.
State represents whether the log is a follower, candidate, or leader.