monitoring

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	IDLE      = time.Duration(60 * time.Second)
	IGNORE    = time.Duration(5 * time.Minute)
	DELTA     = 60
	MIN_DELAY = 30
	PADDING   = 15
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Errors

type Errors uint

func (Errors) String

func (e Errors) String() string

type HealthCheck

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

func NewHealthCheck

func NewHealthCheck(u uhppote.IUHPPOTE, interval, idleTime, ignoreTime time.Duration) HealthCheck

func (*HealthCheck) Exec

func (h *HealthCheck) Exec(handler MonitoringHandler)

func (*HealthCheck) ID

func (h *HealthCheck) ID() string

type Monitor

type Monitor interface {
	ID() string
}

type MonitoringHandler

type MonitoringHandler interface {
	Alive(Monitor, string) error
	Alert(Monitor, string) error
}

type Warnings

type Warnings uint

func (Warnings) String

func (w Warnings) String() string

type Watchdog

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

func NewWatchdog

func NewWatchdog(h *HealthCheck) Watchdog

func (*Watchdog) Exec

func (w *Watchdog) Exec(handler MonitoringHandler) error

func (*Watchdog) ID

func (w *Watchdog) ID() string

Jump to

Keyboard shortcuts

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