Expand description
Raft RPC binary codec — split into logical sub-modules.
Public interface mirrors the old flat rpc_codec.rs:
encode(rpc) -> Result<Vec<u8>>decode(data) -> Result<RaftRpc>frame_size(header) -> Result<usize>- All wire types re-exported from their sub-modules.
Re-exports§
pub use auth_envelope::ENVELOPE_OVERHEAD;pub use auth_envelope::ENVELOPE_VERSION;pub use auth_envelope::EnvelopeFields;pub use auth_envelope::parse_envelope;pub use auth_envelope::write_envelope;pub use cluster_mgmt::JoinGroupInfo;pub use cluster_mgmt::JoinNodeInfo;pub use cluster_mgmt::JoinRequest;pub use cluster_mgmt::JoinResponse;pub use cluster_mgmt::LEADER_REDIRECT_PREFIX;pub use cluster_mgmt::PingRequest;pub use cluster_mgmt::PongResponse;pub use cluster_mgmt::TopologyAck;pub use cluster_mgmt::TopologyUpdate;pub use data_propose::DataProposeRequest;pub use data_propose::DataProposeResponse;pub use execute::DescriptorVersionEntry;pub use execute::ExecuteRequest;pub use execute::ExecuteResponse;pub use execute::PLAN_DECODE_FAILED;pub use execute::TypedClusterError;pub use header::HEADER_SIZE;pub use header::MAX_RPC_PAYLOAD_SIZE;pub use mac::MAC_LEN;pub use mac::MacKey;pub use metadata::MetadataProposeRequest;pub use metadata::MetadataProposeResponse;pub use peer_seq::PeerSeqSender;pub use peer_seq::PeerSeqWindow;pub use peer_seq::REPLAY_WINDOW;pub use raft_rpc::RaftRpc;pub use raft_rpc::decode;pub use raft_rpc::encode;pub use raft_rpc::frame_size;
Modules§
- auth_
envelope - Authenticated frame envelope wrapping the existing RPC wire frame.
- cluster_
mgmt - Cluster management wire types and codecs.
- data_
propose - DataProposeRequest / DataProposeResponse wire types and codecs.
- discriminants
- RPC type discriminant constants.
- execute
- ExecuteRequest / ExecuteResponse — cross-node physical-plan execution RPC.
- header
- RPC frame header layout and framing helpers.
- mac
- Symmetric MAC key + HMAC-SHA256 primitive for the authenticated Raft envelope.
- metadata
- MetadataProposeRequest / MetadataProposeResponse wire types and codecs.
- peer_
seq - Per-peer monotonic sequence counters and a 64-entry sliding-window replay detector.
- raft_
msgs - Raft consensus wire types and codecs.
- raft_
rpc - Top-level
RaftRpcenum andencode/decodedispatcher. - vshard
- VShardEnvelope RPC glue.