module

Raft::HTTP::AdminClient

Client side of the /raft/admin/* wire format. Keeps request shapes in one place so embedders don't hand-roll them.

Single attempt per call, no retry loop — embedders own retry policy. Returns the response ::HTTP::Status so callers can distinguish rejection (400, e.g. already a member — stop retrying) from unavailability (5xx — retry later). Raises only on connection errors.

Class methods

add_server(uri : URI, node_id : NodeID, address : String = "") : ::HTTP::Status

POST <uri>/raft/admin/add_server/<node_id> with a JSON body {"address": address}. Basic auth is taken from the URI's userinfo when present.

Source