health

package
v0.0.0-...-d406eaa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package health is a registry for other packages to report & check overall health status of the node.

Index

Constants

View Source
const (
	// SysDNSOS is the name of the net/dns OSConfigurator subsystem.
	SysDNSOS = Subsystem("dns-os")

	// SysDNSManager is the name of the net/dns manager subsystem.
	SysDNSManager = Subsystem("dns-manager")
)

Variables

This section is empty.

Functions

func DNSOSHealth

func DNSOSHealth() error

DNSOSHealth returns the net/dns.OSConfigurator error state.

func SetDNSManagerHealth

func SetDNSManagerHealth(err error)

SetDNSManagerHealth sets the state of the Linux net/dns manager's discovery of the /etc/resolv.conf situation.

func SetDNSOSHealth

func SetDNSOSHealth(err error)

SetDNSOSHealth sets the state of the net/dns.OSConfigurator

Types

type Subsystem

type Subsystem string

Subsystem is the name of a subsystem whose health can be monitored.

type Warnable

type Warnable struct {
	// contains filtered or unexported fields
}

Warnable is a health check item that may or may not be in a bad warning state. The caller of NewWarnable is responsible for calling Set to update the state.

func NewWarnable

func NewWarnable(opts ...WarnableOpt) *Warnable

NewWarnable returns a new warnable item that the caller can mark as health or in warning state.

func (*Warnable) Set

func (w *Warnable) Set(err error)

Set updates the Warnable's state. If non-nil, it's considered unhealthy.

type WarnableOpt

type WarnableOpt interface {
	// contains filtered or unexported methods
}

WarnableOpt is an option passed to NewWarnable.

func WithMapDebugFlag

func WithMapDebugFlag(name string) WarnableOpt

WithMapDebugFlag returns a WarnableOpt for NewWarnable that makes the returned Warnable report itself to the coordination server as broken with this string in MapRequest.DebugFlag when Set to a non-nil value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL