1pub mod canonical;
13mod checkpoint;
14mod chunk;
15mod client;
16mod codec;
17mod conflict;
18mod discovery;
19mod error;
20mod log;
21mod log_file;
22mod log_file_format;
23mod message_json;
24mod outbox;
25mod outbox_format;
26mod outbox_journal;
27mod outbox_journal_state;
28mod outbox_journal_view;
29mod outbox_size;
30mod outbox_stream;
31mod persistence;
32mod receiver;
33mod retry;
34mod revision;
35mod snapshot;
36mod transport;
37mod types;
38mod wire;
39
40pub use checkpoint::{
41 FileSyncCheckpointStore, InMemorySyncCheckpointStore, SyncCheckpointStore,
42 MAX_CHECKPOINT_FILE_BYTES, MAX_CHECKPOINT_PEER_ID_BYTES, MAX_CHECKPOINT_RECORDS,
43 SYNC_CHECKPOINT_FORMAT_V1,
44};
45pub use chunk::{
46 split_sync_payload, SyncChunkAssembler, SyncChunkInsert, SyncChunkProgress, SyncChunkRange,
47 SyncPayloadChunk, MAX_SYNC_CHUNKS, MAX_SYNC_CHUNK_BYTES, MAX_SYNC_CHUNK_TOTAL_BYTES,
48 MAX_SYNC_TRANSFER_ID_BYTES,
49};
50pub use client::FollowerSyncClient;
51pub use conflict::{
52 InMemorySyncConflictStore, SyncConflict, SyncConflictKind, SyncConflictResolution,
53 SyncConflictResolutionReceipt, SyncConflictResolutionRequest, SyncConflictStore,
54 MAX_CONFLICT_ID_BYTES, MAX_CONFLICT_REASON_BYTES, MAX_SYNC_CONFLICTS,
55};
56pub use discovery::{discover_dns_sync_peers, SyncPeerAddress, SyncPeerScheme};
57pub use error::{SyncError, SyncResult};
58pub use log::{
59 FileReplicationLog, InMemoryReplicationLog, ReplicationLog, MAX_REPLICATION_PAGE_BYTES,
60 MAX_REPLICATION_PAGE_RECORDS, MAX_SYNC_BATCH_PAYLOAD_BYTES, REPLICATION_LOG_FORMAT_V1,
61};
62pub use message_json::write_sync_message_json;
63pub use outbox::{
64 FileSyncOutbox, InMemorySyncOutbox, SyncOutbox, SyncOutboxReceipt, SyncOutboxStats,
65 MAX_OUTBOX_PAGE_BYTES, MAX_OUTBOX_PAGE_MESSAGES, SYNC_OUTBOX_FORMAT_V2,
66};
67pub use outbox_size::encoded_sync_message_bytes;
68pub use receiver::{SyncReceiveAck, SyncReceiverState};
69pub use retry::{SyncPushMetrics, SyncRetryPolicy};
70pub use revision::{
71 decide_object_revision_v1, validate_checkpoint_head_v1, ObjectRevisionV1, RevisionChainV1,
72 RevisionDecisionV1, MAX_REVISION_CHAIN_V1,
73};
74pub use snapshot::{ReplicationSnapshot, ReplicationSnapshotRecord, SYNC_SNAPSHOT_FORMAT_V1};
75pub use transport::{
76 decode_sync_message, HttpSyncTransport, SyncTransport, MAX_SYNC_REQUEST_BODY_BYTES,
77};
78pub use types::{
79 compute_events_hash, HeartbeatMessage, LeaderElection, NodeRole, PeerInfo, SyncMessage,
80 SyncStatus,
81};
82pub use wire::{
83 decode_sync_envelope, encode_sync_envelope_v1, SyncEnvelopeV1, SYNC_WIRE_SCHEMA_V1,
84};
85
86#[cfg(test)]
87pub(crate) use transport::read_http_request_body;
88
89#[cfg(test)]
90mod sync_tests;