Documentation ¶
Overview ¶
Package health is a registry for other packages to report & check overall health status of the node.
Index ¶
- Constants
- func GotStreamedMapResponse()
- func NetworkCategoryHealth() error
- func NoteDERPRegionReceivedFrame(region int)
- func NoteMapRequestHeard(mr *tailcfg.MapRequest)
- func RegisterWatcher(cb func(key Subsystem, err error)) (unregister func())
- func RouterHealth() error
- func SetDERPRegionConnectedState(region int, connected bool)
- func SetIPNState(state string, wantRunning bool)
- func SetInPollNetMap(v bool)
- func SetMagicSockDERPHome(region int)
- func SetNetworkCategoryHealth(err error)
- func SetRouterHealth(err error)
- type Subsystem
Constants ¶
const ( // SysOverall is the name representing the overall health of // the system, rather than one particular subsystem. SysOverall = Subsystem("overall") // SysRouter is the name the wgengine/router subsystem. SysRouter = Subsystem("router") // SysNetworkCategory is the name of the subsystem that sets // the Windows network adapter's "category" (public, private, domain). // If it's unhealthy, the Windows firewall rules won't match. SysNetworkCategory = Subsystem("network-category") )
Variables ¶
This section is empty.
Functions ¶
func GotStreamedMapResponse ¶ added in v1.6.0
func GotStreamedMapResponse()
GotStreamedMapResponse notes that we got a tailcfg.MapResponse message in streaming mode, even if it's just a keep-alive message.
func NetworkCategoryHealth ¶ added in v1.6.0
func NetworkCategoryHealth() error
func NoteDERPRegionReceivedFrame ¶ added in v1.6.0
func NoteDERPRegionReceivedFrame(region int)
func NoteMapRequestHeard ¶ added in v1.6.0
func NoteMapRequestHeard(mr *tailcfg.MapRequest)
NoteMapRequestHeard notes whenever we successfully sent a map request to control for which we received a 200 response.
func RegisterWatcher ¶
RegisterWatcher adds a function that will be called if an error changes state either to unhealthy or from unhealthy. It is not called on transition from unknown to healthy. It must be non-nil and is run in its own goroutine. The returned func unregisters it.
func RouterHealth ¶
func RouterHealth() error
RouterHealth returns the wgengine/router.Router error state.
func SetDERPRegionConnectedState ¶ added in v1.6.0
func SetIPNState ¶ added in v1.6.0
state is an ipn.State.String() value: "Running", "Stopped", "NeedsLogin", etc.
func SetInPollNetMap ¶ added in v1.6.0
func SetInPollNetMap(v bool)
SetInPollNetMap records that we're in
func SetMagicSockDERPHome ¶ added in v1.6.0
func SetMagicSockDERPHome(region int)
SetMagicSockDERPHome notes what magicsock's view of its home DERP is.
func SetNetworkCategoryHealth ¶ added in v1.6.0
func SetNetworkCategoryHealth(err error)
SetNetworkCategoryHealth sets the state of setting the network adaptor's category. This only applies on Windows.
func SetRouterHealth ¶
func SetRouterHealth(err error)
SetRouter sets the state of the wgengine/router.Router.