healthcheck

package
v1.0.34 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ready

func Ready() (supported bool, err error)

Ready is used to nofity system is ready and check, if we need to perform systemd healthchecks

func SetStatus

func SetStatus(status string) (err error)

SetStatus sets systemd unit status in human readable format https://www.freedesktop.org/software/systemd/man/latest/sd_notify.html#STATUS=%E2%80%A6

func StartWatchDog

func StartWatchDog(mainCtx context.Context, pingers []Pinger) (err error)

StartWatchDog starts background process that notifies systemd if application is running properly

Types

type Pinger

type Pinger interface {
	Ping(context.Context) error
}

Pinger is interface StartWatchDog uses

Jump to

Keyboard shortcuts

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