directaccess

package
v1.46.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckLocalIPv4Addresses

func CheckLocalIPv4Addresses(ip *net.IP) (*net.Interface, error)

CheckLocalIPv4Addresses searches the host's non-loopback network interfaces to verify if the specified IPv4 address is currently plumbed and active. It returns the interface where the address is configured, or an error if not found.

func CheckLocalIPv4LoopbackAddress

func CheckLocalIPv4LoopbackAddress() error

CheckLocalIPv4LoopbackAddress verifies that the standard IPv4 loopback address (127.0.0.1) is configured and assigned to a local loopback interface.

func CheckLocalIPv4Routes added in v1.45.0

func CheckLocalIPv4Routes(localIP *net.IP, targetEndpoint string) error

CheckLocalIPv4Routes verifies if the OS has a valid route to the target using the specified local IPv4 address as the source.

func CheckLocalIPv6Addresses

func CheckLocalIPv6Addresses(ip *net.IP) (*net.Interface, error)

CheckLocalIPv6Addresses searches the host's non-loopback network interfaces to verify if the specified IPv6 address is currently plumbed and active. It returns the interface where the address is configured, or an error if not

func CheckLocalIPv6LoopbackAddress

func CheckLocalIPv6LoopbackAddress() error

CheckLocalIPv6LoopbackAddress verifies that the standard IPv6 loopback address (::1) is configured and assigned to a local loopback interface.

func CheckLocalIPv6Routes added in v1.45.0

func CheckLocalIPv6Routes(localIP *net.IP, targetEndpoint string) error

CheckLocalIPv6Routes verifies if the OS has a valid route to the target using the specified local IPv6 address as the source.

func CheckLoopbackInterfaceUp

func CheckLoopbackInterfaceUp() error

CheckLoopbackInterfaceUp verifies that at least one loopback interface is UP.

func CheckMetadataServerReachability

func CheckMetadataServerReachability() error

CheckMetadataServerReachability performs a basic connectivity check to the GCE metadata server.

func FetchIPFromMetadataServer

func FetchIPFromMetadataServer(addrFamilyStr string) (*net.IP, error)

FetchIPFromMetadataServer fetches the assigned IP address from the metadata server.

func FetchXdsEndpoints added in v1.45.0

func FetchXdsEndpoints(ctx context.Context, nodeID, zone, cdsResourceURI string) ([]string, string, error)

FetchXdsEndpoints connects to Traffic Director, performs a CDS check for the given cluster URI, extracts the EDS service name, and fetches the endpoints (IPs) using a single multiplexed ADS stream.

func IsRunningOnGCP

func IsRunningOnGCP() error

IsRunningOnGCP checks that the code is running on GCP by checking the metadata server. Basically, reads /sys/class/dmi/id/product_name

Types

This section is empty.

Jump to

Keyboard shortcuts

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