Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func (*Listener) AddInterestedPeers ¶
func (*Listener) RemoveInterestedPeer ¶
type PeerNotifier ¶
type PeerNotifier struct {
// contains filtered or unexported fields
}
func NewPeerNotifier ¶
func NewPeerNotifier() *PeerNotifier
func (*PeerNotifier) NewListener ¶
func (pn *PeerNotifier) NewListener(onPeersComeOnline, onPeersWentOffline func([]messages.PeerID)) *Listener
func (*PeerNotifier) PeerCameOnline ¶
func (pn *PeerNotifier) PeerCameOnline(peerID messages.PeerID)
func (*PeerNotifier) PeerWentOffline ¶
func (pn *PeerNotifier) PeerWentOffline(peerID messages.PeerID)
func (*PeerNotifier) RemoveListener ¶
func (pn *PeerNotifier) RemoveListener(listener *Listener)
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a thread-safe store of peers It is used to store the peers that are connected to the relay server
func (*Store) AddPeer ¶
AddPeer adds a peer to the store If the peer already exists, it will be replaced and the old peer will be closed Returns true if the peer was replaced, false if it was added for the first time.
func (*Store) DeletePeer ¶
DeletePeer deletes a peer from the store
func (*Store) GetOnlinePeersAndRegisterInterest ¶ added in v0.51.2
Click to show internal directories.
Click to hide internal directories.