health

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check interface {
	Name() string // Name returns the name of the component being checked.
	// TODO_FUTURE: consider adding a message/reason for an unhealthy status.
	IsAlive() bool // IsAlive returns true if the component is healthy, otherwise false.
}

health.Check is an interface that must be implemented by components that need to report their health status

type Checker

type Checker struct {
	Logger            polylog.Logger
	Components        []Check
	ServiceIDReporter ServiceIDReporter
}

health.Checker struct is used to store all PATH components whose health needs to be checked to consider PATH ready to serve traffic.

func (*Checker) HealthzHandler

func (c *Checker) HealthzHandler(w http.ResponseWriter, req *http.Request)

type ServiceIDReporter

type ServiceIDReporter interface {
	ConfiguredServiceIDs() map[protocol.ServiceID]struct{}
}

ServiceIDReporter is satisfied by the protocol instance and returns the list of service IDs that the protocol instance is configured for.

Jump to

Keyboard shortcuts

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