Dynamic allocation master - added definitions of Raft types

This commit is contained in:
Pavel Kirienko
2015-05-01 10:11:31 +03:00
parent 2f718b66b1
commit 1017935ba9
4 changed files with 59 additions and 0 deletions
@@ -0,0 +1,20 @@
#
# This message is used by allocation servers to find each other's node ID.
# Please refer to the specification for details.
#
#
# This message should be broadcasted by the server at this interval until all other servers are discovered.
#
uint16 BROADCASTING_INTERVAL_MS = 1000
#
# Number of servers in the cluster as configured on the sender.
#
uint8 configured_cluster_size
#
# Node ID of servers that are known to the publishing server, including the publishing server itself.
# Capacity of this array defines maximum size of the server cluster.
#
uint8[<=7] known_nodes
@@ -0,0 +1,16 @@
#
# This type is a part of the Raft consensus algorithm.
# Please refer to the specification for details.
#
uint32 term
uint8 prev_log_index
uint8 prev_log_term
uint8 leader_commit
# Request message fits one CAN frame when there's no entries to send.
Entry[<=5] entries
---
uint32 term
bool success
@@ -0,0 +1,13 @@
#
# This type is a part of the Raft consensus algorithm.
# Please refer to the specification for details.
#
uint32 term
uint8 last_log_index
uint8 last_log_term
---
uint32 term
bool vote_granted
@@ -0,0 +1,10 @@
#
# One dynamic node ID allocation entry.
# This type is a part of the Raft consensus algorithm.
# Please refer to the specification for details.
#
uint32 term
uint8[16] unique_id
uint7 node_id
bool alignment