Documentation
¶
Index ¶
- func CheckLocalIPv4Addresses(ip *net.IP) (*net.Interface, error)
- func CheckLocalIPv4LoopbackAddress() error
- func CheckLocalIPv4Routes(localIP *net.IP, targetEndpoint string) error
- func CheckLocalIPv6Addresses(ip *net.IP) (*net.Interface, error)
- func CheckLocalIPv6LoopbackAddress() error
- func CheckLocalIPv6Routes(localIP *net.IP, targetEndpoint string) error
- func CheckLoopbackInterfaceUp() error
- func CheckMetadataServerReachability() error
- func FetchIPFromMetadataServer(addrFamilyStr string) (*net.IP, error)
- func FetchXdsEndpoints(ctx context.Context, nodeID, zone, cdsResourceURI string) ([]string, string, error)
- func IsRunningOnGCP() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckLocalIPv4Addresses ¶
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
CheckLocalIPv4Routes verifies if the OS has a valid route to the target using the specified local IPv4 address as the source.
func CheckLocalIPv6Addresses ¶
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
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 ¶
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.