Get desktop application:
View/edit binary Protocol Buffers messages
ApiService provides the key-value store API operations and Raft cluster management operations
Get retrieves the value associated with a given key
GetRequest represents a key lookup request
Key to look up
Set stores a key-value pair in the distributed store
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
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
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.
InternalService handles internal Raft cluster communication
Vote handles vote requests between Raft nodes during leader election
VoteRequest represents a request for votes during leader election
VoteResponse represents the response to a vote request
AppendEntries handles call related to append entries RPC
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
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. All subsequent fields are valid only when this field is false
The last log id the follower accepted from this request. If None, all input entries were accepted and persisted. Otherwise, only entries up to and including this id were accepted
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.
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.
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:
, , , , ,