Documentation
¶
Index ¶
Constants ¶
const MaxCapabilities = 32
MaxCapabilities is the maximum number of capabilities per payload.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type Capabilities []Capability
Capabilities is a list of Capability.
func (*Capabilities) DecodeBinary ¶
func (cs *Capabilities) DecodeBinary(br *io.BinReader)
DecodeBinary implements Serializable interface.
func (*Capabilities) EncodeBinary ¶
func (cs *Capabilities) EncodeBinary(br *io.BinWriter)
EncodeBinary implements Serializable interface.
type Capability ¶
type Capability struct { Type Type Data io.Serializable }
Capability describes network service available for node.
func (*Capability) DecodeBinary ¶
func (c *Capability) DecodeBinary(br *io.BinReader)
DecodeBinary implements Serializable interface.
func (*Capability) EncodeBinary ¶
func (c *Capability) EncodeBinary(bw *io.BinWriter)
EncodeBinary implements Serializable interface.
type Node ¶
type Node struct {
StartHeight uint32
}
Node represents full node capability with start height.
func (*Node) DecodeBinary ¶
DecodeBinary implements Serializable interface.
func (*Node) EncodeBinary ¶
EncodeBinary implements Serializable interface.
type Server ¶
type Server struct { // Port is the port this server is listening on. Port uint16 }
Server represents TCP or WS server capability with port.
func (*Server) DecodeBinary ¶
DecodeBinary implements Serializable interface.
func (*Server) EncodeBinary ¶
EncodeBinary implements Serializable interface.