Events

Broadcast

Fired when the application layer wishes to broadcast a log entry to the network.

Parameters:
NameTypeDescription
payloadobject

Key-value pairs to broadcast as new log entry.

Debug

Fired when a debug message is loggable.

Parameters:
NameTypeDescription
messagesArray.<string>

Message output arguments.

ElectionTimeout

Fired when a new election should begin.

LogCommit

Fired when an entry is commited to the log.

Parameters:
NameTypeDescription
entrymodule:brig/log~LogEntry

Entry that was committed.

LogRequest

Fired when a node requests entries to be appended to the log.

Parameters:
NameTypeDescription
lReqmodule:brig/messages~LogRequestMessage

Message recevied.

LogResponse

Fired when a response to append entries is received.

Parameters:
NameTypeDescription
lResmodule:brig/messages~LogResponseMessage

Response received.

MessageQueued

Fired when a message should be sent to the peer.

Parameters:
NameTypeDescription
idstring

Peer ID.

msgmodule:brig/messages~Message

Message to be sent.

ReplicationTimeout

Fired when node should replicate log to all followers.

RoleChanged

Fired when the role is changed.

Parameters:
NameTypeDescription
rolemodule:brig/roles~Follower | module:brig/roles~Leader | module:brig/roles~Candidate

RoleChanged

Fired when the role is changed.

Parameters:
NameTypeDescription
rolemodule:brig/roles~Follower | module:brig/roles~Leader | module:brig/roles~Candidate

VoteRequest

Fired when a vote request is received.

Parameters:
NameTypeDescription
vReqmodule:brig/messages~VoteRequestMessage

Message recevied.

VoteResponse

Fired when a reponse is received for a vote request.

Parameters:
NameTypeDescription
vResmodule:brig/messages~VoteResponseMessage

Response recevied.