peers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

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