mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-02 01:51:59 +00:00
tsd, ipnlocal, etc: add tsd.System.HealthTracker, start some plumbing
This adds a health.Tracker to tsd.System, accessible via a new tsd.System.HealthTracker method. In the future, that new method will return a tsd.System-specific HealthTracker, so multiple tsnet.Servers in the same process are isolated. For now, though, it just always returns the temporary health.Global value. That permits incremental plumbing over a number of changes. When the second to last health.Global reference is gone, then the tsd.System.HealthTracker implementation can return a private Tracker. The primary plumbing this does is adding it to LocalBackend and its dozen and change health calls. A few misc other callers are also plumbed. Subsequent changes will flesh out other parts of the tree (magicsock, controlclient, etc). Updates #11874 Updates #4136 Change-Id: Id51e73cfc8a39110425b6dc19d18b3975eac75ce Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
cb66952a0d
commit
723c775dbb
@@ -30,8 +30,11 @@ var (
|
||||
|
||||
// Global is a global health tracker for the process.
|
||||
//
|
||||
// TODO(bradfitz): move this to tsd.System so a process can have multiple
|
||||
// tsnet/etc instances with their own health trackers.
|
||||
// TODO(bradfitz): finish moving all reference to this plumb it (ultimately out
|
||||
// from tsd.System) so a process can have multiple tsnet/etc instances with
|
||||
// their own health trackers. But for now (2024-04-25), the tsd.System value
|
||||
// given out is just this one, until that's the only remaining Global reference
|
||||
// remaining.
|
||||
var Global = new(Tracker)
|
||||
|
||||
type Tracker struct {
|
||||
|
||||
Reference in New Issue
Block a user