Skip to content
SHC Docs

Leader module

Source: modules/leader/ (ce module); the daemon-backed router/commands overlay lives in this repo’s modules/leader/.

CLI
Subcommands0
HTTP endpointssee the route reference
Events emitted
Error codessee the error code reference
Service classes
Cross-module depscluster
modules/leader/
├── errors.go
├── health.go

Typed errors are catalogued in the error code reference with HTTP statuses and message templates.

The leader module is the leader-election read surface. It exposes “who is currently the leader of this cluster?” (via the LeaderService and cached lookup) so other subsystems — cron tiers, vault unlock health monitor, maintenance loops — can decide whether to run on this node. It does not own the election mechanism itself (that is the raft engine — rqlited — combined with the bootstrap logic in cluster + node); it just provides a fast, cached view on top.