watchdog

package
v0.0.0-...-ffa2d3d Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CriticalStop

func CriticalStop(reason string)

CriticalStop is called if the watchdog not be kept alive. A reason must be provided. Such reason will be logged.

func Disable

func Disable() (err error)

Disable will disable the watchdog. When disabled, the watchdog should not cause the system to reboot/rest. Some watchdog plugins may not be able to disable. If so, then an error is reported. If an error is returned, it should be assumed that the watchdog is still running.

func Enable

func Enable() (err error)

Enable will re-enable the previously Disable()ed watchdog.

func LoadWatchdog

func LoadWatchdog(conf *maestroSpecs.WatchdogConfig) (err error)

LoadWatchdog loads the specified watchdog plugin. Only one watchdog plugin can be run at any given time. There is no way to unload a watchdog. Once loaded the watchdog is active.

func Ok

func Ok()

Ok tells the watchdog everything is ok. Should be called if a problem quickly resolved itself after CriticalStop()

func Start

func Start()

Start will start the intervalRunner() internal go routine whcih will ping the active watchdog periodically based on CriticalInterval()

func Stop

func Stop()

Stop - stops the watchdog subsystem and any plugin

Types

type Plug

type Plug struct {
	Path string

	Symbols map[string]interface{}
	// contains filtered or unexported fields
}

type Watchdog

type Watchdog interface {
	ReturnSpec()
}

Watchdog plugins must meet this inteface spec

Jump to

Keyboard shortcuts

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