Documentation
¶
Overview ¶
Package observer implements the observer polling loop and health check orchestration for monitoring Valkey cluster health.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHealthServer ¶
NewHealthServer creates an HTTP server for observer health endpoints.
Types ¶
type CheckResult ¶
type CheckResult struct {
Ready bool `json:"ready"`
Checks map[string]bool `json:"checks"`
Message string `json:"message,omitempty"`
LastCheck time.Time `json:"lastCheck"`
}
CheckResult holds the outcome of a single check cycle.
type Config ¶
type Config struct {
Namespace string
ClusterName string
HealthAddr string
PollInterval time.Duration
ValkeyHeadlessSvc string
Replicas int
Password string
// TLS settings.
TLSEnabled bool
TLSCACert string
TLSCert string
TLSKey string
// ValkeyMTLS controls whether the observer sends a client certificate to Valkey pods.
// Default: true (mTLS enabled).
ValkeyMTLS bool
// SentinelMTLS controls whether the observer sends a client certificate to Sentinel pods.
// Default: false (server-only TLS verification).
SentinelMTLS bool
// Sentinel settings.
SentinelEnabled bool
SentinelAddrs string
SentinelAddrList []string
SentinelMonitor string
SentinelDisableAuth bool
// Observer DB for health key.
ObserverDB int
}
Config holds the observer configuration parsed from flags/env vars.
type Observer ¶
type Observer struct {
// contains filtered or unexported fields
}
Observer runs periodic health checks against a Valkey cluster.
func (*Observer) GetResult ¶
func (o *Observer) GetResult() CheckResult
GetResult returns the latest check result (thread-safe).
Click to show internal directories.
Click to hide internal directories.