tailscale/hostinfo
Brad Fitzpatrick 58a6c9b2b8 version, hostinfo: recognize gokrazy as a distro
Now:

/tmp/breakglass3929186798 # /user/tailscale debug hostinfo
{
  "IPNVersion": "1.23.0-date.20220107",
  "OS": "linux",
  "OSVersion": "Gokrazy; kernel=5.16.11",
  "DeviceModel": "Raspberry Pi 4 Model B Rev 1.2",
  "Hostname": "gokrazy",
  "GoArch": "arm64"
}

Also, cache the distro lookup. It doesn't change while the program is
running:

name   old time/op    new time/op    delta
Get-6    5.21µs ± 5%    0.00µs ± 3%   -99.91%  (p=0.008 n=5+5)

name   old alloc/op   new alloc/op   delta
Get-6      792B ± 0%        0B       -100.00%  (p=0.008 n=5+5)

name   old allocs/op  new allocs/op  delta
Get-6      8.00 ± 0%      0.00       -100.00%  (p=0.008 n=5+5)

Updates #1866

Change-Id: Ifb9a63b94287010d3f4c8bfeb6b78119e8a9b203
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-03-01 19:37:20 -08:00
..
hostinfo.go hostinfo: move packageType out to platform-specific files 2022-02-22 10:23:13 -08:00
hostinfo_darwin.go hostinfo: move packageType out to platform-specific files 2022-02-22 10:23:13 -08:00
hostinfo_freebsd.go hostinfo: add FreeBSD support. 2021-09-06 23:12:09 -07:00
hostinfo_linux.go version, hostinfo: recognize gokrazy as a distro 2022-03-01 19:37:20 -08:00
hostinfo_test.go hostinfo, control/controlclient: tell control when Ubuntu has disabled Tailscale's sources 2021-11-10 09:56:58 -08:00
hostinfo_windows.go hostinfo: use the sentinel value set by the MSI installer to detect MSI package type 2022-02-22 12:48:20 -07:00