mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-15 02:30:07 +00:00
health: make it omittable
Saves 86 KB. And stop depending on expvar and usermetrics when disabled, in prep to removing all the expvar/metrics/tsweb stuff. Updates #12614 Change-Id: I35d2479ddd1d39b615bab32b1fa940ae8cbf9b11 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
9c3aec58ba
commit
447cbdd1d0
@@ -9,6 +9,7 @@ import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"tailscale.com/feature/buildfeatures"
|
||||
"tailscale.com/tailcfg"
|
||||
)
|
||||
|
||||
@@ -120,7 +121,7 @@ func (w *Warnable) unhealthyState(ws *warningState) *UnhealthyState {
|
||||
// The returned State is a snapshot of shared memory, and the caller should not
|
||||
// mutate the returned value.
|
||||
func (t *Tracker) CurrentState() *State {
|
||||
if t.nil() {
|
||||
if !buildfeatures.HasHealth || t.nil() {
|
||||
return &State{}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user