Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddrBook ¶
type AddrBook interface { GetPeers() []Peer GetPeerByID(id string) (Peer, bool) AddPeer(Peer Peer) error RemovePeerByID(id string) }
func NewAddrBook ¶
func NewAddrBook() AddrBook
type DefaultAddrBook ¶
type DefaultAddrBook struct {
// contains filtered or unexported fields
}
func (*DefaultAddrBook) AddPeer ¶
func (ab *DefaultAddrBook) AddPeer(peer Peer) error
func (*DefaultAddrBook) GetPeerByID ¶
func (ab *DefaultAddrBook) GetPeerByID(id string) (Peer, bool)
func (*DefaultAddrBook) GetPeers ¶
func (ab *DefaultAddrBook) GetPeers() []Peer
func (*DefaultAddrBook) RemovePeerByID ¶
func (ab *DefaultAddrBook) RemovePeerByID(id string)
type DefaultPeer ¶
type DefaultPeer struct { ID string // contains filtered or unexported fields }
func (*DefaultPeer) CloseStream ¶
func (p *DefaultPeer) CloseStream() error
func (*DefaultPeer) Send ¶
func (p *DefaultPeer) Send(message services.P2PMessage) error
func (*DefaultPeer) Start ¶
func (p *DefaultPeer) Start() error
Click to show internal directories.
Click to hide internal directories.