monitor

package
v0.0.0-...-250b5a5 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// KeyWaitSeconds indicates how long to wait after power loss before
	// initiating the specified action. The default is two minutes.
	KeyWaitSeconds = "wait_seconds"

	// KeyAction is used to store the intended action after the wait period.
	KeyAction = "action"

	// ActionNothing doesn't do anything.
	ActionNothing = "nothing"

	// ActionShutdown causes a system shutdown to occur.
	ActionShutdown = "shutdown"

	// ActionHibernate causes the system to enter hibernation.
	ActionHibernate = "hibernate"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

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

Monitor connects to a NUT endpoint and monitors it.

func New

func New(l *logger.Logger, c *conf.Conf, addr, name string) *Monitor

New creates a new Monitor instance.

func (*Monitor) Close

func (m *Monitor) Close()

Close shuts down the monitor.

Jump to

Keyboard shortcuts

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