Skip to main content

Module mesh_heartbeat

Module mesh_heartbeat 

Source
Expand description

SWIM-style heartbeat and failure detection for mesh (K6.5).

Implements a simplified SWIM protocol for detecting node failures in the mesh network. Each tick, a random peer is pinged directly; if no response, indirect probes are sent via other peers.

Structs§

HeartbeatConfig
Heartbeat configuration.
HeartbeatTracker
Heartbeat tracker managing all peers.
MeshClockSync
Mesh time synchronization state for a node.
PeerHeartbeat
Heartbeat tracker for a single peer.
PeerMetrics
Observability metrics for a mesh peer, used for affinity scoring.
PingRequest
Ping request.
PingResponse
Ping response.

Enums§

ClockSource
Clock source quality (higher = better, wins authority election).
HeartbeatState
Node health state from heartbeat monitoring.

Functions§

system_time_us
Get current system time in microseconds since Unix epoch.