systemd

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SdNotifyReady tells the service manager that service startup is
	// finished, or the service finished loading its configuration.
	// https://www.freedesktop.org/software/systemd/man/sd_notify.html#READY=1
	SdNotifyReady = "READY=1"

	// SdNotifyWatchdog the service manager to update the watchdog timestamp.
	// https://www.freedesktop.org/software/systemd/man/sd_notify.html#WATCHDOG=1
	SdNotifyWatchdog = "WATCHDOG=1"
)

Variables

This section is empty.

Functions

func HasNotifySocket

func HasNotifySocket() bool

HasNotifySocket checks if the process is supervised by Systemd and has the notify socket.

func HasSystemdWatchdog

func HasSystemdWatchdog() bool

HasSystemdWatchdog checks if the watchdog is configured in Systemd unit file.

func SdNotify

func SdNotify(state string) error

SdNotify sends a message to systemd using the sd_notify protocol. See https://www.freedesktop.org/software/systemd/man/sd_notify.html.

func WatchdogInterval

func WatchdogInterval() (time.Duration, error)

WatchdogInterval returns the watchdog interval configured in systemd unit file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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