addrlist

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddrList

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

AddrList contains peer addresses that are ready to be connected.

func New

func New(maxItems int, blocklist *blocklist.Blocklist, listenPort int, clientIP *net.IP) *AddrList

func (*AddrList) Len

func (d *AddrList) Len() int

func (*AddrList) LenSource added in v0.2.0

func (d *AddrList) LenSource(s PeerSource) int

func (*AddrList) Pop

func (d *AddrList) Pop() *net.TCPAddr

func (*AddrList) Push

func (d *AddrList) Push(addrs []*net.TCPAddr, source PeerSource)

func (*AddrList) Reset

func (d *AddrList) Reset()

type PeerSource added in v0.2.0

type PeerSource int
const (
	Tracker PeerSource = iota
	DHT
	PEX
	Manual
)

Jump to

Keyboard shortcuts

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