wiring URL through health/warnable

This commit is contained in:
James Sanderson 2025-03-26 20:13:57 +00:00
parent a9a846fcf1
commit 5a9259553a
3 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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,
}
}

View File

@ -2037,7 +2037,7 @@ type Health struct {
ID string
Title string
Text string
Link string
URL string
ImpactsConnectivity bool
}