peers

package
v0.2.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2020 License: ISC Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Peers

type Peers struct {
	// contains filtered or unexported fields
}

func NewPeers

func NewPeers(reqHandler request2.IRequestHandler) *Peers

func (*Peers) AddPeer

func (p *Peers) AddPeer(peer *types.Peer)

func (*Peers) AddressExist

func (p *Peers) AddressExist(address *peer.AddrInfo) bool

func (*Peers) Count

func (p *Peers) Count() uint32

func (*Peers) Info

func (p *Peers) Info() map[string]interface{}

func (*Peers) Local

func (p *Peers) Local() *types.Peer

func (*Peers) Name

func (p *Peers) Name() string

func (*Peers) Peer

func (p *Peers) Peer(id string) *types.Peer

func (*Peers) PeersInfo

func (p *Peers) PeersInfo() []*types.Local

func (*Peers) PeersMap

func (p *Peers) PeersMap() map[string]*types.Peer

func (*Peers) RandomPeer

func (p *Peers) RandomPeer() *types.Peer

func (*Peers) RemovePeer

func (p *Peers) RemovePeer(reId string)

func (*Peers) SetLocal

func (p *Peers) SetLocal(local *types.Peer)

func (*Peers) SetSpeed

func (p *Peers) SetSpeed(id string, speed uint64)

func (*Peers) Start

func (p *Peers) Start() error

func (*Peers) Stop

func (p *Peers) Stop() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL