Documentation
¶
Index ¶
Constants ¶
View Source
const ( Pending = iota Propose Vote PreCommit Commit )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommitMessage ¶
func (*CommitMessage) Serialize ¶
func (m *CommitMessage) Serialize() []byte
type MessageInfo ¶
func NewMessageInfo ¶
func NewMessageInfo(o Serializable) *MessageInfo
func (*MessageInfo) GetData ¶
func (m *MessageInfo) GetData() []byte
type NodeInfoMessage ¶
type NodeInfoMessage struct { Id string `json:"id"` Ip string `json:"ip"` Port uint16 `json:"port"` }
func (*NodeInfoMessage) GetData ¶
func (m *NodeInfoMessage) GetData() []byte
type PreCommitMessage ¶
func (*PreCommitMessage) Serialize ¶
func (m *PreCommitMessage) Serialize() []byte
type ProposeMessage ¶
type ProposeMessage struct { Height int `json:"height"` Data string `json:"data"` Validator string `json:"validator"` Signer string `json:"signer"` }
func (*ProposeMessage) Serialize ¶
func (m *ProposeMessage) Serialize() []byte
type Serializable ¶
type Serializable interface {
Serialize() []byte
}
type VoteMessage ¶
func (*VoteMessage) Serialize ¶
func (m *VoteMessage) Serialize() []byte
Click to show internal directories.
Click to hide internal directories.