class

Raft::HTTP::StatusHandler

Inherits HTTP::Handler < Reference < Object

Read-only HTTP handler exposing node status, log metadata, and Prometheus metrics. Safe to mount on an unauthenticated metrics port — does not mutate cluster state.

Routes:

  • GET /raft/status — JSON snapshot of node role, term, leader, peers
  • GET /raft/log — JSON snapshot of log/commit indexes
  • GET /raft/metrics — Prometheus text format

Anything else (including POST /raft/admin/*) falls through to the next handler in the chain via call_next. Pair with AdminHandler to expose the mutating surface on a separate (typically authenticated) endpoint.

Concrete (non-generic) — takes any StatusSource, which Node(T) includes.

Constructors

new(node : StatusSource, transport : TCPTransport | Nil = nil, raft_address : String | Nil = nil)
Source

Instance methods

call(context : ::HTTP::Server::Context)
Source