Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commit ¶
Commit represents a commit message sent between nodes in a consensus round
func (Commit) NodeRound ¶
NodeRound returns the node and round that this message came from. Messages may come from any node participating in consensus.
func (Commit) Pre ¶
func (c Commit) Pre() PrePrepare
Pre formats a PrePrepare message out of this commit message. TODO: Dave check this with George: I suspect this is used in the protocol when a given node has committed to deliver but no consensus has been reached. The Commit is turned into a PrePrepare and re-used.
type Message ¶
type Message interface { Kind() MessageKind NodeRound() (uint64, uint64) String() string }
Message defines an interface for all the other messages to follow
type MessageKind ¶
type MessageKind uint8
MessageKind is an integer identifier for message types.
const ( UnknownMsg MessageKind = iota PrePrepareMsg PrepareMsg CommitMsg ViewChangedMsg NewViewMsg )
func (MessageKind) String ¶
func (m MessageKind) String() string
type NewView ¶
NewView represents a new view message sent between nodes in a consensus round
type PrePrepare ¶
PrePrepare represents a pre-prepare message sent between nodes in a consensus round
func (PrePrepare) NodeRound ¶
func (p PrePrepare) NodeRound() (uint64, uint64)
NodeRound returns the node and round that this message came from. Messages may come from any node participating in consensus.
func (PrePrepare) String ¶
func (p PrePrepare) String() string
type Prepare ¶
Prepare represents a prepare message sent between nodes in a consensus round
func (Prepare) NodeRound ¶
NodeRound returns the node and round that this message came from. Messages may come from any node participating in consensus.
func (Prepare) Pre ¶
func (p Prepare) Pre() PrePrepare
Pre formats a PrePrepare message out of this Prepare message. TODO: Dave check this with George: I suspect this is used in the protocol when a given node has committed to deliver but no consensus has been reached. The Commit is turned into a PrePrepare and re-used.
type ViewChange ¶
ViewChange represents a view-change message sent between nodes in a consensus round
func (ViewChange) NodeRound ¶
func (v ViewChange) NodeRound() (uint64, uint64)
NodeRound returns the node and round that this message came from. Messages may come from any node participating in consensus.
func (ViewChange) String ¶
func (v ViewChange) String() string