Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadEncoding = errors.New("invalid message encoding")
Functions ¶
func MakeTopic ¶
MakeTopic creates a new PubSub object using the default GossipSubRouter as the router, and then joins the named topic. Returns a Topic handle for the joined topic and a CancelFunc to shutdown the PubSub object. Only one Topic handle should exist per topic, and MakeTopic will error if the Topic handle already exists.
Types ¶
type Message ¶
type Message struct { Cid cid.Cid Addrs [][]byte ExtraData []byte // The OrigPeer field may or may not be present in the serialized data, and // the CBOR serializer/deserializer is able to detect that. Only messages // that are re-published by an indexer, for consumption by othen indexers, // contain this field. OrigPeer string }
Message is the payload of a gossip pubsub message.
func (*Message) GetAddrs ¶
GetAddrs reads the slice of Multiaddr that is stored in the Message as a slice of []byte.
Click to show internal directories.
Click to hide internal directories.