sysdwatchdog

package
v5.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WatchDog

type WatchDog struct {
	// contains filtered or unexported fields
}

WatchDog is an interface to the systemd watchdog mechanism

func New

func New() (wd *WatchDog, err error)

New returns an initialized and ready to use WatchDog

func (*WatchDog) GetChecksDuration

func (c *WatchDog) GetChecksDuration() time.Duration

GetChecksDuration returns the ideal time for a client to perform (active or passive collect) checks. Is is equal at 1/3 of watchdogInterval

func (*WatchDog) GetLimitDuration

func (c *WatchDog) GetLimitDuration() time.Duration

GetLimitDuration returns the systemd watchdog limit provided by systemd

func (*WatchDog) NewTicker

func (c *WatchDog) NewTicker() *time.Ticker

NewTicker initializes and returns a ticker set at watchdogChecks (which is set at 1/3 of watchdogInterval). It can be used by clients to trigger checks before using SendHeartbeat().

func (*WatchDog) SendHeartbeat

func (c *WatchDog) SendHeartbeat() error

SendHeartbeat sends a keepalive notification to systemd watchdog

Jump to

Keyboard shortcuts

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