tailscale/net/sockstats
Mihai Parparita b64d78d58f sockstats: refactor validation to be opt-in
Followup to #7499 to make validation a separate function (
GetWithValidation vs. Get). This way callers that don't need it don't
pay the cost of a syscall per active TCP socket.

Also clears the conn on close, so that we don't double-count the stats.

Also more consistently uses Go doc comments for the exported API of the
sockstats package.

Updates tailscale/corp#9230
Updates #3363

Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2023-03-09 14:31:20 -08:00
..
label_string.go sockstats: switch label to enum 2023-03-06 15:54:35 -08:00
sockstats_noop.go sockstats: refactor validation to be opt-in 2023-03-09 14:31:20 -08:00
sockstats_tsgo_darwin.go sockstats: add validation for TCP socket stats 2023-03-08 13:39:30 -08:00
sockstats_tsgo.go sockstats: refactor validation to be opt-in 2023-03-09 14:31:20 -08:00
sockstats.go sockstats: refactor validation to be opt-in 2023-03-09 14:31:20 -08:00