Classes

BroadcastMessage
LogRequestMessage
LogResponseMessage
Message
VoteRequestMessage
VoteResponseMessage

Type Definitions

LogRequestMessageOptions

Type:
  • object
Properties
NameTypeDescription
leaderIdstring

The current leader.

termnumber

The current election term.

prefixLengthnumber

Number of entries prior.

leaderCommitnumber

Latest commit from leader.

suffixArray.<module:brig/log~LogEntry>

Entries.

LogResponseMessageOptions

Type:
  • object
Properties
NameTypeDescription
followerIdstring

Peer ID of the follower.

termnumber

Election term.

acknumber

Total acks for the entry.

successboolean

True if peer write the entry.

VoteRequestMessageOptions

Type:
  • object
Properties
NameTypeDescription
candidateIdbuffer

Node ID to request vote for.

currentTermnumber

The current election term.

currentLogLengthnumber

The length of the candidates current log.

currentLogLastTermnumber

The last term in the current log.

VoteResponseMessageOptions

Type:
  • object
Properties
NameTypeDescription
voterIdbuffer

Node ID to request vote for.

termnumber

The current election term.

grantedboolean

Indicates if the peer was voted for.