package messages
- Alphabetic
- Public
- All
Type Members
-
final
case class
AddressedMessage[+A](from: NodeId, message: RequestOrResponse[A]) extends RaftMessage[A] with Product with Serializable
- from
represents the source of the message
- message
the message
-
final
class
AppendData[A, F[_]] extends RaftMessage[A]
Represents input from a client of the cluster
Represents input from a client of the cluster
- A
the log entry type.
- final case class AppendEntries[A](previous: LogCoords, term: Term, commitIndex: LogIndex, entries: Array[LogEntry[A]] = Array.empty[LogEntry[A]]) extends RaftRequest[A] with Product with Serializable
- final case class AppendEntriesResponse extends RaftResponse with Product with Serializable
-
sealed
trait
RaftMessage[+A] extends AnyRef
Represents the possible input types into a riff.raft.node.RaftNode
Represents the possible input types into a riff.raft.node.RaftNode
Encapsulating all inputs w/ a single type makes the riff.raft.node.RaftNode easy to drive via a data stream, put behind an actor, invoke from an unmarshalled POST request, etc.
- A
the log entry type. This type is added here (as opposed to just on the AddressedMessage as an aid for circe to be able to provide generic encoder/decoders
-
sealed
trait
RaftRequest[+A] extends RequestOrResponse[A]
RaftRequest
-
sealed
trait
RaftResponse extends RequestOrResponse[Nothing]
Raft Response
- sealed trait RequestOrResponse[+A] extends AnyRef
- final case class RequestVote(term: Term, logState: LogCoords) extends RaftRequest[Nothing] with Product with Serializable
- final case class RequestVoteResponse(term: Term, granted: Boolean) extends RaftResponse with Product with Serializable
- sealed trait TimerMessage extends RaftMessage[Nothing]
Value Members
- object AppendData
- object AppendEntriesResponse extends Serializable
-
object
ReceiveHeartbeatTimeout extends TimerMessage with Product with Serializable
Marks a timeout of not hearing from a leader
-
object
SendHeartbeatTimeout extends TimerMessage with Product with Serializable
Marks a timeout for a leader indicating it should sent a heartbeat to the given follower