Leader module
Source: modules/leader/ (ce module); the daemon-backed router/commands overlay lives in this repo’s modules/leader/.
At a glance
Section titled “At a glance”| CLI | — |
| Subcommands | 0 |
| HTTP endpoints | see the route reference |
| Events emitted | — |
| Error codes | see the error code reference |
| Service classes | — |
| Cross-module deps | cluster |
Source layout
Section titled “Source layout”modules/leader/├── errors.go├── health.goErrors
Section titled “Errors”Typed errors are catalogued in the error code reference with HTTP statuses and message templates.
Responsibilities
Section titled “Responsibilities”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.
shc@docs:~$