Documentation
¶
Index ¶
- Constants
- func BroadcastPeers(msgPayload []byte, MessageType MessageType, digest types.Hash, ...)
- func BroadcastPeersFilter(msgPayload []byte, MessageType MessageType, digest types.Hash, ...)
- func EncodeMessage(msg Message) ([]byte, error)
- func Unicast(account account.Account, msgPayload []byte, MessageType MessageType, ...) error
- type Commit
- type CommitMessage
- type ConsensusResult
- type Message
- type MessageHeader
- type MessageType
- type Proposal
- type ProposalMessage
- type Request
- type RequestMessage
- type Response
- type ResponseMessage
- type SyncBlockReq
- type SyncBlockReqMessage
- type SyncBlockResp
- type SyncBlockRespMessage
- type ViewChangeReq
- type ViewChangeReqMessage
Constants ¶
View Source
const ( NIL = MessageType(iota) RequestMessageType ProposalMessageType ResponseMessageType CommitMessageType SyncBlockReqMessageType SyncBlockRespMessageType ViewChangeMessageReqType )
Variables ¶
This section is empty.
Functions ¶
func BroadcastPeers ¶
func BroadcastPeersFilter ¶
func EncodeMessage ¶
EncodeMessage encode message to byte array.
Types ¶
type ConsensusResult ¶
type Message ¶
type Message struct {
MessageType MessageType
PayLoad interface{}
}
func DecodeMessage ¶
func DecodeMessage(MessageType MessageType, rawMsg []byte) (Message, error)
type MessageHeader ¶
type MessageHeader struct {
Magic uint32
MessageType MessageType
Length uint32
}
type SyncBlockReq ¶
type SyncBlockReqMessage ¶
type SyncBlockReqMessage struct {
SyncBlock *SyncBlockReq
}
sync block request msg
type SyncBlockResp ¶
type SyncBlockRespMessage ¶
type SyncBlockRespMessage struct {
SyncBlock *SyncBlockResp
}
sync block response msg
type ViewChangeReq ¶
type ViewChangeReqMessage ¶
type ViewChangeReqMessage struct {
ViewChange *ViewChangeReq
}
change view request msg
Click to show internal directories.
Click to hide internal directories.