Get desktop application:
View/edit binary Protocol Buffers messages
ApiService provides the key-value store API operations and Raft cluster management operations
AddLearner adds a new learner node to the Raft cluster
AddLearnerRequest specifies parameters for adding a learner node
Node to be added as a learner
ChangeMembership modifies the cluster membership configuration
ChangeMembershipRequest specifies parameters for modifying cluster membership
New set of voter node IDs
Whether to retain existing configuration
Get retrieves the value associated with a given key
GetRequest represents a key lookup request
Key to look up
Init initializes a new Raft cluster with the given nodes
InitRequest contains the initial set of nodes for cluster initialization
List of initial cluster nodes
Metrics retrieves cluster metrics and status information
Cluster membership config
In this example, only membership is used. Other metrics are just encoded in string for simplicity. In real-world scenarios, metrics should be encoded in a more structured format.
Set stores a key-value pair in the distributed store
InternalService handles internal Raft cluster communication
AppendEntries handles call related to append entries RPC
PreVote handles prevote requests between Raft nodes during leader election
Snapshot handles install snapshot RPC
The item of snapshot chunk stream. The first item contains `meta`, including the leader vote and snapshot-meta. Since the second item, the chunk contains the snapshot data.
StreamAppend handles streaming append entries for pipeline replication
Vote handles vote requests between Raft nodes during leader election
Used as request type in: RaftService.AppendEntries, RaftService.StreamAppend
The leader's vote, used to identify the leader, and must be committed
The previous log id the leader has sent to the follower
The entries to be appended to the follower's log
The leader's last committed log id
The reply to AppendEntries and to each StreamAppend request; both RPCs use the same encoding.
Used as response type in: RaftService.AppendEntries, RaftService.StreamAppend
If not None, the follower rejected the AppendEntries request due to having a higher vote. All other fields are valid only when this field is None
The follower accepts this AppendEntries request's vote, but the prev_log_id conflicts with the follower's log. The leader should retry with a smaller prev_log_id that matches the follower's log.
If `conflict = false`, the last log id the follower accepted from this request. If `conflict = true`, the request's prev_log_id, which conflicts with the follower's log. A peer built before AppendEntries shared this encoding leaves this field unset in a unary reply on conflict and when it accepted every entry. A client talking to such a peer takes these log ids from its request.
Set only with `conflict = true`: the follower's log after it truncated the conflicting entries, which guides the leader's next probe. A peer built before this field neither sends nor reads it; without a hint, the leader uses binary search.
Used as response type in: AppService.AddLearner, AppService.ChangeMembership
The log id of the committed log entry.
If the committed log entry is a normal one.
If the committed log entry is a change-membership entry.
Follower log IDs that guide the leader's next AppendEntries probe after a conflict.
Used in:
Used in:
Optional Application data
Optional Membership config
LeaderId represents the leader identifier in Raft
Used in:
LogId represents the log identifier in Raft
Used in: , , , , , , ,
Membership config
Used in: , , , ,
Joint(includes more than one NodeIdSet) or uniform(one NodeIdSet) config.
All of the nodes in the cluster, including voters and learners. A node id that is included in `configs` is a voter, otherwise it is a learner.
Node represents a single node in the Raft cluster
Used in: , ,
Unique identifier for the node
RPC address for node communication
NodeIds is a set of NodeIds
Used in:
GetResponse contains the value associated with the requested key
Used as response type in: AppService.Get, AppService.Set
Used as field type in:
Retrieved value
SetRequest represents a key-value pair to be stored
Used as request type in: AppService.Set
Used as field type in:
Key to store
Value to associate with the key
The first chunk of snapshot transmission, which contains the snapshot meta.
Used in:
All the data in a state machine, including user defined data and membership data.
The last log id that has been applied to the state machine
User data in a map
The id of the last membership config log entry that is applied.
The last membership config that is applied.
Vote represents the voting information in Raft leader election
Used in: , , , , ,
VoteRequest represents a request for votes during leader election
Used as request type in: RaftService.PreVote, RaftService.Vote
The vote of the Leader that authorized this election as a leadership transfer; unset for an ordinary election. A voter that follows that Leader grants such a request even if the leader lease has not expired.
VoteResponse represents the response to a vote request
Used as response type in: RaftService.PreVote, RaftService.Vote