Documentation
¶
Overview ¶
Package netutil provides utility functions for network operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPortOpen ¶ added in v0.5.0
IsPortOpen checks if the TCP port is open/used. It returns true if the port is open/used, otherwise false.
Types ¶
type InterfaceAddr ¶ added in v0.5.0
InterfaceAddr represents a network interface and its associated InterfaceAddr address.
func DefaultRouteHostIPv4 ¶ added in v0.13.2
func DefaultRouteHostIPv4() (InterfaceAddr, error)
DefaultRouteHostIPv4 returns the IPv4 address kubelet would choose as the node InternalIP when no address is configured: the global unicast address on the interface holding the default route (k8s.io/apimachinery ChooseHostInterface). On hosts without /proc/net/route (e.g., macOS), ChooseHostInterface falls back to the first up, non-loopback interface with a global unicast address.
The address is not required to be RFC1918; bare-metal hosts commonly use non-RFC1918 internal ranges (e.g., 7.0.0.0/8) for the host network.
type InterfaceAddrs ¶ added in v0.5.0
type InterfaceAddrs []InterfaceAddr
InterfaceAddrs is a slice of InterfaceAddr.
func GetPrivateIPs ¶ added in v0.5.0
func GetPrivateIPs(opts ...OpOption) (InterfaceAddrs, error)
GetPrivateIPs finds private IP addresses using an optional interface filter. It returns a slice of IP structs, each containing interface and address information.
func (InterfaceAddrs) RenderTable ¶ added in v0.5.0
func (addrs InterfaceAddrs) RenderTable(wr io.Writer)
RenderTable renders the InterfaceAddrs as a table.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package latency contains logic for egress traffic from each device.
|
Package latency contains logic for egress traffic from each device. |
|
edge
Package edge provides a client for the Tailscale DERP (Designated Edge Router Protocol) service.
|
Package edge provides a client for the Tailscale DERP (Designated Edge Router Protocol) service. |
|
edge/derpmap
Package derpmap provides the tailscale derp map implementation.
|
Package derpmap provides the tailscale derp map implementation. |
|
edge/derpmap/sync
command
"sync" syncs the tailscale derp map.
|
"sync" syncs the tailscale derp map. |