mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
19b0c8a024
updates tailscale/corp#21823 Misconfigured, broken, or blocked DNS will often present as "internet is broken'" to the end user. This plumbs the health tracker into the dns manager and forwarder and adds a health warning with a 5 second delay that is raised on failures in the forwarder and lowered on successes. Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
40 lines
1.7 KiB
Go
40 lines
1.7 KiB
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
package health
|
|
|
|
// Arg is a type for the key to be used in the Args of a Warnable.
|
|
type Arg string
|
|
|
|
const (
|
|
// ArgAvailableVersion provides an update notification Warnable with the available version of the Tailscale client.
|
|
ArgAvailableVersion Arg = "available-version"
|
|
|
|
// ArgCurrentVersion provides an update notification Warnable with the current version of the Tailscale client.
|
|
ArgCurrentVersion Arg = "current-version"
|
|
|
|
// ArgDuration provides a Warnable with how long the Warnable has been in an unhealthy state.
|
|
ArgDuration Arg = "duration"
|
|
|
|
// ArgError provides a Warnable with the underlying error behind an unhealthy state.
|
|
ArgError Arg = "error"
|
|
|
|
// ArgMagicsockFunctionName provides a Warnable with the name of the Magicsock function that caused the unhealthy state.
|
|
ArgMagicsockFunctionName Arg = "magicsock-function-name"
|
|
|
|
// ArgDERPRegionID provides a Warnable with the ID of a DERP server involved in the unhealthy state.
|
|
ArgDERPRegionID Arg = "derp-region-id"
|
|
|
|
// ArgDERPRegionName provides a Warnable with the name of a DERP server involved in the unhealthy state.
|
|
// It is used to show a more friendly message like "the Seattle relay server failed to connect" versus
|
|
// "relay server 10 failed to connect".
|
|
ArgDERPRegionName Arg = "derp-region-name"
|
|
|
|
// ArgServerName provides a Warnable with the hostname of a server involved in the unhealthy state.
|
|
ArgServerName Arg = "server-name"
|
|
|
|
// ArgServerName provides a Warnable with comma delimited list of the hostname of the servers involved in the unhealthy state.
|
|
// If no nameservers were available to query, this will be an empty string.
|
|
ArgDNSServers Arg = "dns-servers"
|
|
)
|