From 5a9259553a821c51204d75c7bfb518639ebd0340 Mon Sep 17 00:00:00 2001 From: James Sanderson Date: Wed, 26 Mar 2025 20:13:57 +0000 Subject: [PATCH] wiring URL through health/warnable --- health/health.go | 2 ++ health/state.go | 2 ++ tailcfg/tailcfg.go | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/health/health.go b/health/health.go index ac67c5ccd..62ea194a8 100644 --- a/health/health.go +++ b/health/health.go @@ -253,6 +253,8 @@ type Warnable struct { // should be surfaced as unhealthy to the user. This is used to prevent transient errors from being // displayed to the user. TimeToVisible time.Duration + + URL string } // StaticMessage returns a function that always returns the input string, to be used in diff --git a/health/state.go b/health/state.go index c06f6ef59..8fe87f0a9 100644 --- a/health/state.go +++ b/health/state.go @@ -31,6 +31,7 @@ type UnhealthyState struct { Args Args `json:",omitempty"` DependsOn []WarnableCode `json:",omitempty"` ImpactsConnectivity bool `json:",omitempty"` + URL string `json:",omitempty"` } // unhealthyState returns a unhealthyState of the Warnable given its current warningState. @@ -63,6 +64,7 @@ func (w *Warnable) unhealthyState(ws *warningState) *UnhealthyState { Args: ws.Args, DependsOn: dependsOnWarnableCodes, ImpactsConnectivity: w.ImpactsConnectivity, + URL: w.URL, } } diff --git a/tailcfg/tailcfg.go b/tailcfg/tailcfg.go index 42887a0fe..b27546d1d 100644 --- a/tailcfg/tailcfg.go +++ b/tailcfg/tailcfg.go @@ -2037,7 +2037,7 @@ type Health struct { ID string Title string Text string - Link string + URL string ImpactsConnectivity bool }