Add "cluster introducer" functionality to nodes (ref #120)

This commit is contained in:
Jakob Borg
2014-09-23 16:04:20 +02:00
parent 24e5000c37
commit e596a45e9f
9 changed files with 133 additions and 17 deletions

View File

@@ -249,7 +249,7 @@ The Node Flags field contains the following single bit flags:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved |Pri| Reserved |R|T|
| Reserved |Pri| Reserved |I|R|T|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Bit 31 ("T", Trusted) is set for nodes that participate in trusted
@@ -258,6 +258,9 @@ The Node Flags field contains the following single bit flags:
- Bit 30 ("R", Read Only) is set for nodes that participate in read
only mode.
- Bit 29 ("I", Introducer) is set for nodes that are trusted as cluster
introducers.
- Bits 16 through 28 are reserved and MUST be set to zero.
- Bits 14-15 ("Pri) indicate the node's upload priority for this
@@ -276,7 +279,7 @@ The Node Flags field contains the following single bit flags:
- Bits 0 through 14 are reserved and MUST be set to zero.
Exactly one of the T, R or S bits MUST be set.
Exactly one of the T and R bits MUST be set.
The per node Max Local Version field contains the highest local file
version number of the files already known to be in the index sent by

View File

@@ -47,6 +47,7 @@ const (
const (
FlagShareTrusted uint32 = 1 << 0
FlagShareReadOnly = 1 << 1
FlagIntroducer = 1 << 2
FlagShareBits = 0x000000ff
)