Leader module
Layer 2. Core. Core It reads rqlite leadership and does not run an engine.
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 | None |
| Subcommands | 0 |
| HTTP endpoints | see the route reference |
| Events emitted | None |
| Error codes | see the error code reference |
| Service classes | None |
| Cross-module deps | cluster |
Source layout
Section titled “Source layout”modules/leader/└── errors.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 reads who is leader (LeaderService in service.go)
so other subsystems can decide whether to run on this node. It does not
run the election. That is rqlite (core/db/driver.go), with bootstrap in
cluster and node.
shc@docs:~$