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 OnlineRequest
- type OnlineRequestMessage
- type OnlineResponse
- type OnlineResponseMessage
- type Proposal
- type ProposalMessage
- type Request
- type RequestMessage
- type Response
- type ResponseMessage
- type SyncBlockReq
- type SyncBlockReqMessage
- type SyncBlockResp
- type SyncBlockRespMessage
- type SyncRoleAssignmentReq
- type SyncRoleAssignmentReqMessage
- type SyncRoleAssignmentResp
- type SyncRoleAssignmentRespMessage
- type ViewChangeReq
- type ViewChangeReqMessage
Constants ¶
View Source
const ( RequestMessageType // 1, request message for bft ProposalMessageType // 2, proposal message for bft ResponseMessageType // 3, response message for bft CommitMessageType // 4, commit message for bft SyncBlockReqMessageType // 5, sync block request SyncBlockRespMessageType // 6, sync block response ViewChangeMessageReqType // 7, change view request OnlineRequestType // 8, node online request OnlineResponseType // 9, response for node online request )
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 OnlineRequest ¶ added in v0.3.0
type OnlineRequestMessage ¶ added in v0.3.0
type OnlineRequestMessage struct {
OnlineRequest *OnlineRequest
}
online request
type OnlineResponse ¶ added in v0.3.0
type OnlineResponseMessage ¶ added in v0.3.0
type OnlineResponseMessage struct {
OnlineResponse *OnlineResponse
}
online response
type SyncBlockReq ¶
type SyncBlockReqMessage ¶
type SyncBlockReqMessage struct {
SyncBlockReq *SyncBlockReq
}
sync block request msg
type SyncBlockResp ¶
type SyncBlockRespMessage ¶
type SyncBlockRespMessage struct {
SyncBlockResp *SyncBlockResp
}
sync block response msg
type SyncRoleAssignmentReq ¶ added in v0.3.0
type SyncRoleAssignmentReqMessage ¶ added in v0.3.0
type SyncRoleAssignmentReqMessage struct {
SyncRoleAssignmentReq *SyncRoleAssignmentReq
}
sync role assignment from other node
type SyncRoleAssignmentResp ¶ added in v0.3.0
type SyncRoleAssignmentRespMessage ¶ added in v0.3.0
type SyncRoleAssignmentRespMessage struct {
SyncRoleAssignmentResp *SyncRoleAssignmentResp
}
send sync role assignment to other node
type ViewChangeReq ¶
type ViewChangeReqMessage ¶
type ViewChangeReqMessage struct {
ViewChange *ViewChangeReq
}
change view request msg
Click to show internal directories.
Click to hide internal directories.