addressing

package
v1.15.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 1 Imported by: 20

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