Skip to main content

Module http_service

Module http_service 

Source
Expand description

Axum HTTP service for receiving Raft RPCs.

Provides an Axum router with endpoints for all Raft RPC operations. Uses postcard2 serialization for request/response bodies.

When an auth_token is provided, every request must include an Authorization: Bearer <token> header matching the expected value. Requests without a valid token receive HTTP 401.

§Endpoints

MethodPathDescription
POST/raft/voteRequestVote RPC
POST/raft/appendAppendEntries RPC
POST/raft/snapshotInstallSnapshot RPC
POST/raft/full-snapshotFull snapshot transfer

Functions§

raft_service_router
Create an Axum router for Raft RPC endpoints.