Documentation
¶
Overview ¶
Package netdiag names the processes behind a network failure, so an error such as "address already in use" says who holds the port.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PortOccupants ¶
PortOccupants reports every TCP socket in this network namespace whose local port is one of ports: local and remote address, state and — when the owning process is visible in this pid namespace — pid and command line. It is attached to failures that name "address already in use", so a taken port names its occupant instead of leaving a bare EADDRINUSE. A socket without a visible owner belongs to a process in another pid namespace that shares this network namespace (on CircleCI's v2 docker runtime the job container shares its pod's namespace with the task agent). Linux only: it reads /proc/net/tcp{,6} and /proc/*/fd; elsewhere, or if /proc is unavailable, it returns "".
Types ¶
This section is empty.