Documentation
¶
Overview ¶
Package resolver maps a network connection (proto + local port + remote endpoint) to the process that owns it, and that process to a display name.
On macOS there is no syscall that takes a 4-tuple and returns a PID, so the resolver periodically enumerates every process' open socket file descriptors (libproc) and builds a reverse index. Lookups consult that index and trigger an on-demand rescan when a key misses and the cache is stale.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver holds the reverse index and process metadata cache. Safe for concurrent use.
func New ¶
New returns a Resolver. minInterval bounds how often an on-demand miss can force a rescan, protecting against busy-looping the (relatively expensive) full process/fd enumeration.