Documentation
¶
Index ¶
- func IsNotifyEnabled() bool
- func NotifyBusError(buserror string) error
- func NotifyErrNo(errno int) error
- func NotifyMainPID(mainpid int) error
- func NotifyReady() error
- func NotifyReloading() error
- func NotifyStatus(status string) error
- func NotifyStopping() error
- func NotifyWatchDog() error
- func NotifyWatchDogUSec(usec int64) error
- type WatchDog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotifyEnabled ¶
func IsNotifyEnabled() bool
IsNotifyEnabled tells if systemd notify is enabled or not.
func NotifyBusError ¶
NotifyBusError sends systemd notify BUSERROR=%s{buserror}
func NotifyErrNo ¶
NotifyErrNo sends systemd notify ERRNO=%d{errno}
func NotifyMainPID ¶
NotifyMainPID sends systemd notify MAINPID=%d{mainpid}
func NotifyReloading ¶
func NotifyReloading() error
NotifyReloading sends systemd notify RELOADING=1
func NotifyStatus ¶
NotifyStatus sends systemd notify STATUS=%s{status}
func NotifyWatchDogUSec ¶
NotifyWatchDogUSec sends systemd notify WATCHDOG_USEC=%d{µsec}
Types ¶
type WatchDog ¶
type WatchDog struct {
// contains filtered or unexported fields
}
WatchDog is an interface to the systemd watchdog mechanism
func NewWatchdog ¶
NewWatchdog returns an initialized and ready to use WatchDog
func (*WatchDog) GetChecksDuration ¶
GetChecksDuration returns the ideal time for a client to perform (active or passive collect) checks. Is is equal at 1/3 of watchdogInterval
func (*WatchDog) GetLimitDuration ¶
GetLimitDuration returns the systemd watchdog limit provided by systemd
func (*WatchDog) NewTicker ¶
NewTicker initializes and returns a ticker set at watchdogChecks (which is set at 1/3 of watchdogInterval). It can be used by clients to trigger checks before using SendHeartbeat().
func (*WatchDog) SendHeartbeat ¶
SendHeartbeat sends a keepalive notification to systemd watchdog