ipfamily

package
v0.14.9 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Family

type Family string

IP family helps identifying single stack IPv4/IPv6 vs Dual-stack ["IPv4", "IPv6"] or ["IPv6", "Ipv4"].

const (
	IPv4      Family = "ipv4"
	IPv6      Family = "ipv6"
	DualStack Family = "dual"
	Unknown   Family = "unknown"
)

func ForAddress

func ForAddress(ip net.IP) Family

ForAddress returns the address family for a given address.

func ForAddresses

func ForAddresses(ips []string) (Family, error)

ForAddresses returns the address family given list of addresses strings.

func ForAddressesIPs

func ForAddressesIPs(ips []net.IP) (Family, error)

ForAddressesIPs returns the address family from a given list of addresses IPs.

func ForCIDR

func ForCIDR(cidr *net.IPNet) Family

ForCIDR returns the address family from a given CIDR.

func ForService added in v0.13.0

func ForService(svc *v1.Service) (Family, error)

ForService returns the address family of a given service.

func (Family) String

func (f Family) String() string

Jump to

Keyboard shortcuts

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