watchdog

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Disarmed watchdogStatus = iota
	Armed
	Triggered
	Malfunction
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Watchdog

type Watchdog interface {
	// Start should be called by the manager and block on the given context
	Start(ctx context.Context) error
	// Status shows current watchdog status
	Status() watchdogStatus
	// Stop stops feeding the watchdog, which results in a reboot of the node
	Stop()
	// GetTimeout returns the watchdog timeout when it reboots the node without feeding
	GetTimeout() time.Duration
	// LastFoodTime return the last time the watchdog was fed
	LastFoodTime() time.Time
}

Watchdog is the public facing interface for the watchdog

func NewFake

func NewFake(isStartSuccessful bool) Watchdog

func NewLinux

func NewLinux(log logr.Logger) (Watchdog, error)

Jump to

Keyboard shortcuts

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