monitoring

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHTTPMonitoring

func RegisterHTTPMonitoring(c HTTPMonitoringConfig, l log.Logger, leader LeaderChecker, healthers map[string]HealthChecker) chi.Router

Types

type HTTPHealthMonitoring

type HTTPHealthMonitoring struct {
	httpserver.HTTPResponder
	// contains filtered or unexported fields
}

func NewHTTPHealthMonitoring

func NewHTTPHealthMonitoring(healthChecker HealthChecker, leaderChecker LeaderChecker, c HTTPMonitoringConfig, l log.Logger) HTTPHealthMonitoring

func (HTTPHealthMonitoring) HandleIsHealthy

func (a HTTPHealthMonitoring) HandleIsHealthy(w http.ResponseWriter, r *http.Request)

type HTTPLeaderMonitoring

type HTTPLeaderMonitoring struct {
	httpserver.HTTPResponder
	// contains filtered or unexported fields
}

func NewHTTPLeaderMonitoring

func NewHTTPLeaderMonitoring(leaderChecker LeaderChecker, l log.Logger) HTTPLeaderMonitoring

func (HTTPLeaderMonitoring) HandleIsLeader

func (a HTTPLeaderMonitoring) HandleIsLeader(w http.ResponseWriter, r *http.Request)

type HTTPMonitoringConfig

type HTTPMonitoringConfig struct {
	Clusters []string
	Endpoint string
}

type HealthChecker added in v0.0.13

type HealthChecker interface {
	CheckHealth() error
}

HealthChecker encapsulates logic about health checking.

type LeaderChecker

type LeaderChecker interface {
	// IsLeader returns whether app is running controllers or not.
	IsLeader() bool
}

Jump to

Keyboard shortcuts

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