Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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
Click to show internal directories.
Click to hide internal directories.