mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-30 05:25:35 +00:00
b64d78d58f
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>
26 lines
406 B
Go
26 lines
406 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
//go:build !tailscale_go || !(darwin || ios || android)
|
|
|
|
package sockstats
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
func withSockStats(ctx context.Context, label Label) context.Context {
|
|
return ctx
|
|
}
|
|
|
|
func get() *SockStats {
|
|
return nil
|
|
}
|
|
|
|
func getValidation() *ValidationSockStats {
|
|
return nil
|
|
}
|
|
|
|
func setLinkMonitor(lm LinkMonitor) {
|
|
}
|