Discover Packages
github.com/GLINCKER/levelrail
internal
selfheartbeat
package
Version:
v1.5.11
Opens a new window with list of versions in this module.
Published: Nov 26, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 12
Opens a new window with list of imports.
Imported by: 0 modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package selfheartbeat sends an outbound ping so an external monitor can page
when the control plane itself goes silent.
View Source
const (
EnvTimeout = "APP_SELF_HEARTBEAT_TIMEOUT"
EnvLogEvery = "APP_SELF_HEARTBEAT_LOG_EVERY"
)
Env names for the fixed bounds; the URL and interval are live runtime settings.
Config bounds one request and the failure log rate.
ConfigFromEnv reads the tunables; bad values fall back to defaults.
Pinger sends the heartbeat GET.
New builds a Pinger on the SSRF-guarded client; call Run to start it.
Interval is the live ping interval, clamped to the setting's range.
Poll pings when the interval has elapsed since the last ping; with no URL it does nothing.
Run polls the settings every few seconds and pings once the live interval has elapsed.
Tick sends one ping. With no URL set it makes no request.
Settings reads live runtime settings; *runtimesettings.Service satisfies it.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.