health

package
v1.96.5 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package health contains shared types and underlying methods for serving a `/healthz` endpoint for containerboot and k8s-proxy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Healthz

type Healthz struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Healthz is a simple health check server, if enabled it returns 200 OK if this tailscale node currently has at least one tailnet IP address else returns 503.

func RegisterHealthHandlers

func RegisterHealthHandlers(mux *http.ServeMux, podIPv4 string, logger logger.Logf) *Healthz

RegisterHealthHandlers registers a simple health handler at /healthz. A containerized tailscale instance is considered healthy if it has at least one tailnet IP address.

func (*Healthz) MonitorHealth

func (h *Healthz) MonitorHealth(ctx context.Context, lc *local.Client) error

func (*Healthz) ServeHTTP

func (h *Healthz) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Healthz) Update

func (h *Healthz) Update(healthy bool)

Jump to

Keyboard shortcuts

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