Help us shape the future of Go! Take the 2026 Go Developer Survey

addressing

package
v1.19.9 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 1 Imported by: 37

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractNodeIP added in v1.15.0

func ExtractNodeIP[T Address](addrs []T, ipv6 bool) net.IP

ExtractNodeIP returns one of the provided IP addresses available with the following priority: - NodeInternalIP - NodeExternalIP - other IP address type An error is returned if ExtractNodeIP fails to get an IP based on the provided address family.

Types

type Address added in v1.15.0

type Address interface {
	AddrType() AddressType
	ToString() string
}

type AddressType

type AddressType string

AddressType represents a type of IP address for a node. They are copied from k8s.io/api/core/v1/types.go to avoid pulling in a lot of Kubernetes imports into this package.

const (
	NodeHostName         AddressType = "Hostname"
	NodeExternalIP       AddressType = "ExternalIP"
	NodeInternalIP       AddressType = "InternalIP"
	NodeExternalDNS      AddressType = "ExternalDNS"
	NodeInternalDNS      AddressType = "InternalDNS"
	NodeCiliumInternalIP AddressType = "CiliumInternalIP"
)

Jump to

Keyboard shortcuts

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