Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuzzEvent ¶
type BuzzEvent struct { Id uint64 // random 64bit uint value to identify the event (Not sha256 32bytes hash) Pubkey [32]byte // encoded 256bit uint (holiman/uint256) Created_at int64 // unix timestamp in seconds Kind uint16 // integer between 0 and 65535 Tags map[string][]string // Key: tag string, Value: other strings Content string Sig [64]byte // 64-bytes integr of the signature of the sha256 hash of the serialized event data }
type BuzzPacket ¶
BuzzPacket is an implementation of GossipData
func NewBuzzPacket ¶
func NewBuzzPacket(event *BuzzEvent, req *BuzzReq, resp *BuzzResp) *BuzzPacket
Construct an empty BuzzPacket object, ready to receive updates. This is suitable to use at program start. Other peers will populate us with data.
func (*BuzzPacket) Encode ¶
func (pkt *BuzzPacket) Encode() [][]byte
Encode serializes BuzzPacket to a slice of byte-slices.
func (*BuzzPacket) Merge ¶
func (st *BuzzPacket) Merge(other mesh.GossipData) (complete mesh.GossipData)
Merge merges the other GossipData into this one, and returns our resulting, complete BuzzPacket.
Click to show internal directories.
Click to hide internal directories.