tailscale/net/sockstats/sockstats_noop.go
Mihai Parparita 782ccb5655 .github/workflows: run one set of tests with the tailscale_go build tag
We use it to gate code that depends on custom Go toolchain, but it's
currently only passed in the corp runners. Add a set on OSS so that we
can catch regressions earlier.

To specifically test sockstats this required adding a build tag to
explicitly enable them -- they're normally on for iOS, macOS and Android
only, and we don't run tests on those platforms normally.

Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2023-04-12 16:34:26 -07:00

32 lines
514 B
Go

// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
//go:build !tailscale_go || !(darwin || ios || android || ts_enable_sockstats)
package sockstats
import (
"context"
)
const IsAvailable = false
func withSockStats(ctx context.Context, label Label) context.Context {
return ctx
}
func get() *SockStats {
return nil
}
func getInterfaces() *InterfaceSockStats {
return nil
}
func getValidation() *ValidationSockStats {
return nil
}
func setLinkMonitor(lm LinkMonitor) {
}