peers

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IPV4Only

func IPV4Only(ip net.IP) bool

IPV4Only is an IPFilter function that filters out non IPv4 address

Types

type Filter

type Filter func(ip net.IP) bool

func Exclude

func Exclude(ranges Ranges) Filter

Exclude ranges, return IPs that are NOT in the given ranges

func Include

func Include(ranges Ranges) Filter

Include ranges, return IPs that are IN one of the given ranges

type Peers

type Peers []string

Peers is a peers list

func PeersList

func PeersList() (Peers, error)

func (Peers) Ups

func (p Peers) Ups(filter ...Filter) (Peers, error)

Ups return all the peers that are marked up from the PeerList p

type Ranges

type Ranges []net.IPNet

Ranges is a list of net.IPNet

Jump to

Keyboard shortcuts

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