Documentation ¶
Index ¶
- Constants
- type NotifAdapter
- type Notifiee
- type PeerSet
- type TopicMsgHandler
- type TopicWires
- func (t *TopicWires) Close() error
- func (t *TopicWires) Connected() []peer.ID
- func (t *TopicWires) Join(topic string) error
- func (t *TopicWires) Leave(topic string) error
- func (t *TopicWires) Neighbors(topic string) []peer.ID
- func (t *TopicWires) SendTopicMsg(topic string, p peer.ID, data []byte) error
- func (t *TopicWires) SetNotifiee(notifiee Notifiee)
- func (t *TopicWires) SetTopicMsgHandler(tmh TopicMsgHandler)
- func (t *TopicWires) Topics() []string
Constants ¶
View Source
const (
TopicWiresProtocolID = protocol.ID("/topic-wires/1.0.0")
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NotifAdapter ¶
type NotifAdapter struct { HandleUp func(neigh peer.ID, topic string) HandleDown func(neigh peer.ID, topic string) }
func (*NotifAdapter) HandleNeighDown ¶
func (na *NotifAdapter) HandleNeighDown(neigh peer.ID, topic string)
func (*NotifAdapter) HandleNeighUp ¶
func (na *NotifAdapter) HandleNeighUp(neigh peer.ID, topic string)
type PeerSet ¶
type PeerSet struct {
// contains filtered or unexported fields
}
func NewPeerSet ¶
func NewPeerSet() *PeerSet
type TopicWires ¶
type TopicWires struct {
// contains filtered or unexported fields
}
func NewTopicWires ¶
func NewTopicWires(h host.Host) (*TopicWires, error)
func (*TopicWires) Close ¶
func (t *TopicWires) Close() error
func (*TopicWires) Connected ¶
func (t *TopicWires) Connected() []peer.ID
func (*TopicWires) Join ¶
func (t *TopicWires) Join(topic string) error
func (*TopicWires) Leave ¶
func (t *TopicWires) Leave(topic string) error
func (*TopicWires) SendTopicMsg ¶
func (*TopicWires) SetNotifiee ¶
func (t *TopicWires) SetNotifiee(notifiee Notifiee)
func (*TopicWires) SetTopicMsgHandler ¶
func (t *TopicWires) SetTopicMsgHandler(tmh TopicMsgHandler)
func (*TopicWires) Topics ¶
func (t *TopicWires) Topics() []string
Click to show internal directories.
Click to hide internal directories.