Documentation
¶
Index ¶
Constants ¶
View Source
const Version0 = "0"
Variables ¶
View Source
var ( PubSubPrototypes struct { Announcement schema.TypedPrototype } )
Functions ¶
This section is empty.
Types ¶
type Announcement ¶
type Announcement struct {
Version string
Type AnnouncementType
Addrs []string
}
func (*Announcement) MarshalBinary ¶
func (a *Announcement) MarshalBinary() ([]byte, error)
func (*Announcement) SetAddrs ¶
func (a *Announcement) SetAddrs(ma ...multiaddr.Multiaddr)
func (*Announcement) UnmarshalBinary ¶
func (a *Announcement) UnmarshalBinary(b []byte) error
type AnnouncementType ¶
type AnnouncementType int
const ( UnknownAnnouncementType AnnouncementType = iota IExistAnnouncementType )
type Option ¶
type Option func(*options) error
func WithAnnounceInterval ¶
WithAnnounceInterval sets the interval at which announcements are made on the pubsub. Defaults to 5 seconds if unset.
func WithHost ¶
WithHost sets the libp2p host on which the pool is exposed. If unset a default host with random identity is used. See: libp2p.New.
func WithPoolName ¶
WithPoolName sets a human readable name for the pool. Required.
func WithTopicName ¶
WithTopicName sets the name of the topic onto which announcements are made. Defaults to "/explore.fula/pools/<pool-name>" if unset. See: WithPoolName.
Click to show internal directories.
Click to hide internal directories.