watchdog

package
v0.0.0-...-036eace Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pinger

type Pinger interface {
	Ping() bool
}

Pinger method to ping the REST service

func DefaultPinger

func DefaultPinger(unixSocketPath string) (Pinger, error)

DefaultPinger returns a default implementation for Pinger interface using a REST client pointing to a local unix socket

type Watchdog

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

Watchdog manager for the systemd wathdog feature

func New

func New(keepAliveInterval time.Duration, pinger Pinger) *Watchdog

New returns a new instance of a watchdog

func (*Watchdog) Run

func (w *Watchdog) Run(ctx context.Context) error

Run starts watchdogging

func (*Watchdog) Stop

func (w *Watchdog) Stop() error

Stop stops watchdogging

Jump to

Keyboard shortcuts

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