gather

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Precedence added in v0.7.0

func Precedence(ip net.IP) int

Precedence returns precedence value of ip address defined by RFC 6724.

Types

type Addr

type Addr struct {
	IP         net.IP
	Zone       string
	Precedence int
}

Addr represents gathered address from interface.

func (Addr) String

func (a Addr) String() string

func (Addr) ZeroPortAddr

func (a Addr) ZeroPortAddr() string

ZeroPortAddr return address with "0" port.

type Addrs

type Addrs []Addr

Addrs is addr slice helper.

func (Addrs) Len

func (s Addrs) Len() int

func (Addrs) Less

func (s Addrs) Less(i, j int) bool

func (Addrs) Swap

func (s Addrs) Swap(i, j int)

type Gatherer

type Gatherer interface {
	Gather() ([]Addr, error)
}

Gatherer is source for addresses.

See RFC 8445 Section 2.1 for details on gathering.

var DefaultGatherer Gatherer = defaultGatherer{}

DefaultGatherer uses net.Interfaces to gather addresses.

Jump to

Keyboard shortcuts

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