Documentation ¶
Overview ¶
TODO: the Java version sends V1 join messages during the startup process, but V2s in some other contexts. Clarify whether this is really needed, or whether we can just live with V2 everywhere.
TODO: the Java version sends V1 join messages during the startup process, but V2s in some other contexts. Clarify whether this is really needed, or whether we can just live with V2 everywhere.
Index ¶
- type BlockRequest
- type BlockResponse
- type BlockWithVotesRequest
- type BlockWithVotesResponse
- type BooleanResponse
- type BootstrapRequest
- type BootstrapResponse
- type Default
- type IpAddress
- type MeshResponse
- type MissingBlockRequest
- type MissingBlockVoteRequest
- type NewVerifierVote
- type NodeJoin
- type NodeJoinLegacy
- type NodeJoinResponse
- type NodeJoinResponseLegacy
- type StatusResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockRequest ¶
func NewBlockRequest ¶
func NewBlockRequest(startHeight, endHeight int64, includeBalanceList bool) *BlockRequest
func (*BlockRequest) GetSerializedLength ¶
func (c *BlockRequest) GetSerializedLength() int
Serializable interface: data length when serialized
func (*BlockRequest) Read ¶
func (c *BlockRequest) Read(r io.Reader) error
Serializable interface: convert from bytes.
func (*BlockRequest) ToBytes ¶
func (c *BlockRequest) ToBytes() []byte
Serializable interface: convert to bytes.
type BlockResponse ¶
type BlockResponse struct { BalanceList *blockchain_data.BalanceList Blocks []*blockchain_data.Block }
func NewBlockResponse ¶
func NewBlockResponse(balanceList *blockchain_data.BalanceList, blocks []*blockchain_data.Block) *BlockResponse
func (*BlockResponse) GetSerializedLength ¶
func (c *BlockResponse) GetSerializedLength() int
Serializable interface: data length when serialized
func (*BlockResponse) Read ¶
func (c *BlockResponse) Read(r io.Reader) error
Serializable interface: convert from bytes.
func (*BlockResponse) ToBytes ¶
func (c *BlockResponse) ToBytes() []byte
Serializable interface: convert to bytes.
type BlockWithVotesRequest ¶
type BlockWithVotesRequest struct {
Height int64
}
func NewBlockWithVotesRequest ¶
func NewBlockWithVotesRequest(height int64) *BlockWithVotesRequest
func (*BlockWithVotesRequest) GetSerializedLength ¶
func (c *BlockWithVotesRequest) GetSerializedLength() int
Serializable interface: data length when serialized
func (*BlockWithVotesRequest) Read ¶
func (c *BlockWithVotesRequest) Read(r io.Reader) error
Serializable interface: convert from bytes.
func (*BlockWithVotesRequest) ToBytes ¶
func (c *BlockWithVotesRequest) ToBytes() []byte
Serializable interface: convert to bytes.
type BlockWithVotesResponse ¶
type BlockWithVotesResponse struct { Block *blockchain_data.Block Votes []*blockchain_data.BlockVote }
func (*BlockWithVotesResponse) GetSerializedLength ¶
func (r *BlockWithVotesResponse) GetSerializedLength() int
Serializable interface: data length when serialized
func (*BlockWithVotesResponse) Read ¶
func (r *BlockWithVotesResponse) Read(re io.Reader) error
Serializable interface: convert from bytes.
func (*BlockWithVotesResponse) ToBytes ¶
func (r *BlockWithVotesResponse) ToBytes() []byte
Serializable interface: convert to bytes.
type BooleanResponse ¶
func NewBooleanResponse ¶
func NewBooleanResponse(success bool, message string) *BooleanResponse
func (*BooleanResponse) GetSerializedLength ¶
func (c *BooleanResponse) GetSerializedLength() int
Serializable interface: data length when serialized
func (*BooleanResponse) Read ¶
func (c *BooleanResponse) Read(r io.Reader) error
Serializable interface: convert from bytes.
func (*BooleanResponse) ToBytes ¶
func (c *BooleanResponse) ToBytes() []byte
Serializable interface: convert to bytes.
type BootstrapRequest ¶
type BootstrapRequest struct {
Port int32
}
func NewBootstrapRequest ¶
func NewBootstrapRequest(port int32) *BootstrapRequest
func (*BootstrapRequest) GetSerializedLength ¶
func (c *BootstrapRequest) GetSerializedLength() int
Serializable interface: data length when serialized
func (*BootstrapRequest) Read ¶
func (c *BootstrapRequest) Read(r io.Reader) error
Serializable interface: convert from bytes.
func (*BootstrapRequest) ToBytes ¶
func (c *BootstrapRequest) ToBytes() []byte
Serializable interface: convert to bytes.
type BootstrapResponse ¶
type BootstrapResponse struct { FrozenEdgeHeight int64 FrozenEdgeHash []byte CycleVerifiers [][]byte }
func NewBootstrapRespone ¶
func NewBootstrapRespone(frozenEdgeHeight int64, frozenEdgeHash []byte, cycleVerifiers [][]byte) *BootstrapResponse
func (*BootstrapResponse) GetSerializedLength ¶
func (c *BootstrapResponse) GetSerializedLength() int
Serializable interface: data length when serialized
func (*BootstrapResponse) Read ¶
func (c *BootstrapResponse) Read(r io.Reader) error
Serializable interface: convert from bytes.
func (*BootstrapResponse) ToBytes ¶
func (c *BootstrapResponse) ToBytes() []byte
Serializable interface: convert to bytes.
type Default ¶
type Default struct {
Content []byte
}
default message content if we don't know how to serialize/deserialize it
func (*Default) GetSerializedLength ¶
Serializable interface: data length when serialized.
type IpAddress ¶
type IpAddress struct {
Address []byte
}
func NewIpAddress ¶
func (*IpAddress) GetSerializedLength ¶
Serializable interface: data length when serialized
type MeshResponse ¶
func NewMeshResponse ¶
func NewMeshResponse(nodes []*node.Node) *MeshResponse
Create a new mesh response message with the given nodes.
func (*MeshResponse) GetSerializedLength ¶
func (c *MeshResponse) GetSerializedLength() int
Serializable interface: data length when serialized.
func (*MeshResponse) Read ¶
func (c *MeshResponse) Read(r io.Reader) error
Serializable interface: read nodes from data bytes.
func (*MeshResponse) ToBytes ¶
func (c *MeshResponse) ToBytes() []byte
Serializable interface: write notes to data bytes.
type MissingBlockRequest ¶
func NewMissingBlockRequest ¶
func NewMissingBlockRequest(height int64, hash []byte) *MissingBlockRequest
func (*MissingBlockRequest) GetSerializedLength ¶
func (c *MissingBlockRequest) GetSerializedLength() int
Serializable interface: data length when serialized
func (*MissingBlockRequest) Read ¶
func (c *MissingBlockRequest) Read(r io.Reader) error
Serializable interface: convert from bytes.
func (*MissingBlockRequest) ToBytes ¶
func (c *MissingBlockRequest) ToBytes() []byte
Serializable interface: convert to bytes.
type MissingBlockVoteRequest ¶
type MissingBlockVoteRequest struct {
Height int64
}
func NewMissingBlockVoteRequest ¶
func NewMissingBlockVoteRequest(height int64) *MissingBlockVoteRequest
func (*MissingBlockVoteRequest) GetSerializedLength ¶
func (c *MissingBlockVoteRequest) GetSerializedLength() int
Serializable interface: data length when serialized
func (*MissingBlockVoteRequest) Read ¶
func (c *MissingBlockVoteRequest) Read(r io.Reader) error
Serializable interface: convert from bytes.
func (*MissingBlockVoteRequest) ToBytes ¶
func (c *MissingBlockVoteRequest) ToBytes() []byte
Serializable interface: convert to bytes.
type NewVerifierVote ¶
type NewVerifierVote struct {
Identifier []byte
}
func NewNewVerifierVote ¶
func NewNewVerifierVote(identifier []byte) *NewVerifierVote
func (*NewVerifierVote) GetSerializedLength ¶
func (c *NewVerifierVote) GetSerializedLength() int
Serializable interface: data length when serialized
func (*NewVerifierVote) Read ¶
func (c *NewVerifierVote) Read(r io.Reader) error
Serializable interface: convert from bytes.
func (*NewVerifierVote) ToBytes ¶
func (c *NewVerifierVote) ToBytes() []byte
Serializable interface: convert to bytes.
type NodeJoin ¶
func NewNodeJoin ¶
func (*NodeJoin) GetSerializedLength ¶
Serializable interface: data length when serialized
type NodeJoinLegacy ¶
func NewNodeJoinLegacy ¶
func NewNodeJoinLegacy(port int32, nickname string) *NodeJoinLegacy
func (*NodeJoinLegacy) GetSerializedLength ¶
func (c *NodeJoinLegacy) GetSerializedLength() int
Serializable interface: data length when serialized
func (*NodeJoinLegacy) Read ¶
func (c *NodeJoinLegacy) Read(r io.Reader) error
Serializable interface: convert from bytes.
func (*NodeJoinLegacy) ToBytes ¶
func (c *NodeJoinLegacy) ToBytes() []byte
Serializable interface: convert to bytes.
type NodeJoinResponse ¶
func NewNodeJoinResponse ¶
func NewNodeJoinResponse(nickname string, portTcp, portUdp int32) *NodeJoinResponse
func (*NodeJoinResponse) GetSerializedLength ¶
func (c *NodeJoinResponse) GetSerializedLength() int
Serializable interface: data length when serialized
func (*NodeJoinResponse) Read ¶
func (c *NodeJoinResponse) Read(r io.Reader) error
Serializable interface: convert from bytes.
func (*NodeJoinResponse) ToBytes ¶
func (c *NodeJoinResponse) ToBytes() []byte
Serializable interface: convert to bytes.
type NodeJoinResponseLegacy ¶
type NodeJoinResponseLegacy struct { Nickname string Port int32 NewVerifierVote NewVerifierVote }
func NewNodeJoinResponseLegacy ¶
func NewNodeJoinResponseLegacy(nickname string, port int32, newVerifierVote NewVerifierVote) *NodeJoinResponseLegacy
func (*NodeJoinResponseLegacy) GetSerializedLength ¶
func (c *NodeJoinResponseLegacy) GetSerializedLength() int
Serializable interface: data length when serialized
func (*NodeJoinResponseLegacy) Read ¶
func (c *NodeJoinResponseLegacy) Read(r io.Reader) error
Serializable interface: convert from bytes.
func (*NodeJoinResponseLegacy) ToBytes ¶
func (c *NodeJoinResponseLegacy) ToBytes() []byte
Serializable interface: convert to bytes.
type StatusResponse ¶
type StatusResponse struct {
Lines []string
}
func NewStatusResponse ¶
func NewStatusResponse(lines []string) *StatusResponse
func (*StatusResponse) GetSerializedLength ¶
func (c *StatusResponse) GetSerializedLength() int
Serializable interface: data length when serialized
func (*StatusResponse) Read ¶
func (c *StatusResponse) Read(r io.Reader) error
Serializable interface: convert from bytes.
func (*StatusResponse) ToBytes ¶
func (c *StatusResponse) ToBytes() []byte
Serializable interface: convert to bytes.
Source Files ¶
- block_request.go
- block_response.go
- block_with_votes_request.go
- block_with_votes_response.go
- boolean_response.go
- bootstrap_request.go
- bootstrap_response.go
- default.go
- ip_address.go
- mesh_response.go
- missing_block_request.go
- missing_block_vote_request.go
- new_verifier_vote.go
- node_join.go
- node_join_legacy.go
- node_join_response.go
- node_join_response_legacy.go
- status_response.go
Directories ¶
Path | Synopsis |
---|---|
Byte level message field sizes Byte level message field serialization.
|
Byte level message field sizes Byte level message field serialization. |