Versions in this module Expand all Collapse all v0 v0.2.0 Mar 28, 2024 v0.1.0 Sep 27, 2023 Changes in this version + var ErrAccecptClosed = &net.OpError + var ErrNoEnoughListeners = errors.New("must supply at least two listeners") + type Addr struct + func (addr Addr) IPAddr() string + func (addr Addr) IsIPv4() bool + func (addr Addr) IsIPv6() bool + func (addr Addr) IsLoopback() bool + func (addr Addr) MaskSize() int + type AddrList []net.Addr + func (s AddrList) Len() int + func (s AddrList) Less(i, j int) bool + func (s AddrList) Swap(i, j int) + type AddrSlice []Addr + func (addrs AddrSlice) Contains(ip string) bool + type AggregatedListener interface + AcceptTCP func() (*net.TCPConn, error) + AcceptUnix func() (*net.UnixConn, error) + Addrs func() []net.Addr + TCPAddrs func() []*net.TCPAddr + UnixAddrs func() []*net.UnixAddr + func NewAggregatedListener(listeners ...net.Listener) (AggregatedListener, error) + type BalancedDialer interface + DialContext func(ctx context.Context, network, address string) (net.Conn, error) + func NewBalancedDialer(opt Options) BalancedDialer + type Balancer interface + Balance func(ctx context.Context, addrList []net.Addr) []net.Addr + type BalancerBuilder interface + Build func(host string, addrList []net.Addr) Balancer + type Interface struct + func InterfaceByName(name string) (*Interface, error) + func (dev *Interface) Addrs() (AddrSlice, error) + func (dev *Interface) IsLoopback() bool + type InterfaceSlice []Interface + func Interfaces() (InterfaceSlice, error) + func InterfacesByIP(ip string) (InterfaceSlice, error) + func InterfacesByLoopback() (InterfaceSlice, error) + func (ifaces InterfaceSlice) Contains(name string) bool + func (ifaces InterfaceSlice) Filter(filterFunc func(iface Interface) bool) InterfaceSlice + func (ifaces InterfaceSlice) Get(name string) *Interface + func (ifaces InterfaceSlice) One() *Interface + type Options struct + BalancerBuilder BalancerBuilder + Resolver Resolver + type Resolver interface + LookupIPAddr func(ctx context.Context, host string) (addrs []net.IPAddr, err error) + LookupPort func(ctx context.Context, network, service string) (port int, err error) + type TCPListener interface + AcceptTCP func() (*net.TCPConn, error) + type UnixListener interface + AcceptUnix func() (*net.UnixConn, error)