pub struct HttpReplicationClient { /* private fields */ }Expand description
HTTP replication client that implements ReplicationProtocol against an HttpReplicationServer.
Uses MessagePack (rmp-serde) for control messages and raw bytes for segment transfer.
Implementations§
Trait Implementations§
Source§impl ReplicationProtocol for HttpReplicationClient
impl ReplicationProtocol for HttpReplicationClient
Source§fn merkle_root(&self) -> Result<[u8; 32], EdgestoreError>
fn merkle_root(&self) -> Result<[u8; 32], EdgestoreError>
Fetch the remote peer’s current Merkle root.
Calls GET {base_url}/merkle, deserializes MessagePack body as {root: Vec<u8>},
and converts to [u8; 32].
Source§fn list_segments(&self) -> Result<Vec<SegmentRef>, EdgestoreError>
fn list_segments(&self) -> Result<Vec<SegmentRef>, EdgestoreError>
Fetch the remote peer’s full segment manifest.
Calls GET {base_url}/segments, deserializes MessagePack as a list of segment entries,
and converts each to SegmentRef.
Source§fn watermark(&self) -> Result<WatermarkResponse, EdgestoreError>
fn watermark(&self) -> Result<WatermarkResponse, EdgestoreError>
Fetch the primary’s commit watermark.
Calls GET {base_url}/watermark, deserializes MessagePack as
{confirmed_lsn, wtoken}. Used by AntiEntropyLoop to detect
primary failovers when wtoken increases.
Source§fn fetch_segment(&self, hash: &[u8; 32]) -> Result<Vec<u8>, EdgestoreError>
fn fetch_segment(&self, hash: &[u8; 32]) -> Result<Vec<u8>, EdgestoreError>
Fetch one segment’s raw bytes by content hash.
Calls GET {base_url}/segments/{hash_hex}, reads raw bytes from body.
Caller MUST verify BLAKE3 before applying.