util/clientmetric: define Type unconditionally

Move Type and its constants to an unconditional file so syspolicy, and
its dependents such as tsnet, compile with ts_omit_clientmetrics.

Fixes #22252

Change-Id: Ib9ca1c192e3e1c570aa32d41650d72fbff1aff0c
Signed-off-by: Fredrik Fornwall <[email protected]>
This commit is contained in:
Fredrik Fornwall authored and Brad Fitzpatrick committed 2026-11-09 07:51:50 -08:00
1 parent 019ab096f5
commit 3c19e6d2a7
2 files changed
+12 -8

No files matched your search

-8
View File
@@ -51,14 +51,6 @@ type scanEntry struct {
lastLogged int64 // last logged value
}
// Type is a metric type: counter or gauge.
type Type uint8
const (
TypeGauge Type = iota
TypeCounter
)
// MetricUpdate requests that a client metric value be updated.
//
// This is the request body sent to /localapi/v0/upload-client-metrics.
+12
View File
@@ -0,0 +1,12 @@
// Copyright (c) Tailscale Inc & contributors
// SPDX-License-Identifier: BSD-3-Clause
package clientmetric
// Type is a metric type: counter or gauge.
type Type uint8
const (
TypeGauge Type = iota
TypeCounter
)