tailcfg,hostinfo: add App field to identify tsnet uses

This allows us to differentiate between the various tsnet apps that
we have like `golinks` and `k8s-operator`.

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2023-02-27 09:58:54 -08:00
committed by Maisem Ali
parent 780c56e119
commit 49c206fe1e
6 changed files with 33 additions and 2 deletions

View File

@@ -41,6 +41,7 @@ func TestHostinfoEqual(t *testing.T) {
"Distro",
"DistroVersion",
"DistroCodeName",
"App",
"Desktop",
"Package",
"DeviceModel",
@@ -216,6 +217,16 @@ func TestHostinfoEqual(t *testing.T) {
&Hostinfo{},
false,
},
{
&Hostinfo{App: "golink"},
&Hostinfo{App: "abc"},
false,
},
{
&Hostinfo{App: "golink"},
&Hostinfo{App: "golink"},
true,
},
}
for i, tt := range tests {
got := tt.a.Equal(tt.b)