package watchdog
import "k8s.io/kubernetes/pkg/kubelet/watchdog"
Index ¶
- type DefaultWatchdogClient
- func (d *DefaultWatchdogClient) SdNotify(unsetEnvironment bool) (bool, error)
- func (d *DefaultWatchdogClient) SdWatchdogEnabled(unsetEnvironment bool) (time.Duration, error)
- type HealthChecker
- type Option
- func WithExtendedCheckers(checkers []healthz.HealthChecker) Option
- func WithWatchdogClient(watchdog WatchdogClient) Option
- type WatchdogClient
Types ¶
type DefaultWatchdogClient ¶
type DefaultWatchdogClient struct{}
DefaultWatchdogClient implements the WatchdogClient interface using the actual systemd daemon functions.
func (*DefaultWatchdogClient) SdNotify ¶
func (d *DefaultWatchdogClient) SdNotify(unsetEnvironment bool) (bool, error)
func (*DefaultWatchdogClient) SdWatchdogEnabled ¶
func (d *DefaultWatchdogClient) SdWatchdogEnabled(unsetEnvironment bool) (time.Duration, error)
type HealthChecker ¶
type HealthChecker interface {
Start()
}
HealthChecker defines the interface of health checkers.
func NewHealthChecker ¶
func NewHealthChecker(syncLoop syncLoopHealthChecker, opts ...Option) (HealthChecker, error)
NewHealthChecker creates a new HealthChecker instance. This function initializes the health checker and configures its behavior based on the status of the systemd watchdog. If the watchdog is not enabled, the function returns an error.
type Option ¶
type Option func(*healthChecker)
Option defines optional parameters for initializing the healthChecker structure.
func WithExtendedCheckers ¶
func WithExtendedCheckers(checkers []healthz.HealthChecker) Option
func WithWatchdogClient ¶
func WithWatchdogClient(watchdog WatchdogClient) Option
type WatchdogClient ¶
type WatchdogClient interface { SdWatchdogEnabled(unsetEnvironment bool) (time.Duration, error) SdNotify(unsetEnvironment bool) (bool, error) }
WatchdogClient defines the interface for interacting with the systemd watchdog.
Source Files ¶
types.go watchdog_linux.go
- Version
- v1.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 3 hours ago –
Tools for package owners.