Skip to main content

Module sync

Module sync 

Source
Expand description

Minimal sync contracts and local implementations.

Structs§

FileReplicationLog
File-backed append-only replication log for local runtime sync.
FileSyncCheckpointStore
File-backed checkpoint store (line-based peer=sequence,hash).
FileSyncOutbox
Crash-consistent file-backed synchronization outbox.
FollowerSyncClient
Pushes leader events to a follower over transport.
HeartbeatMessage
Transport-neutral heartbeat message.
HttpSyncTransport
Bounded blocking HTTP client for leader-to-follower sync batches.
InMemoryReplicationLog
In-memory replication log for local sync scenarios.
InMemorySyncCheckpointStore
In-memory checkpoint store for tests/local runtime.
InMemorySyncOutbox
Process-local synchronization outbox.
PeerInfo
Peer metadata used by sync orchestration.
ReplicationSnapshot
Integrity-protected portable image of a replication log.
ReplicationSnapshotRecord
Sequence-addressed event stored in a replication snapshot.
SyncEnvelopeV1
Versioned sync envelope carrying the complete distributed source identity.
SyncMessage
Mensagem de replicação enviada do líder para o seguidor.
SyncPeerAddress
Parsed and normalized address of a synchronization peer.
SyncPushMetrics
Basic sync push metrics for local observability.
SyncReceiveAck
Ack returned by /v1/sync/events.
SyncReceiverState
In-memory receiver state for follower sync endpoint.
SyncRetryPolicy
Retry and queue limits for follower push.

Enums§

NodeRole
Node role used by leader election and write routing.
SyncError
Sync-local typed errors.
SyncPeerScheme
HTTP scheme supported by the built-in synchronization transport.
SyncStatus
Coarse sync health and progress status.

Constants§

REPLICATION_LOG_FORMAT_V1
Stable on-disk format marker for hash-chained replication logs.
SYNC_CHECKPOINT_FORMAT_V1
Stable on-disk format marker for peer checkpoints.
SYNC_OUTBOX_FORMAT_V1
Stable on-disk format marker for durable sync outboxes.
SYNC_SNAPSHOT_FORMAT_V1
Stable format version for portable replication snapshots.
SYNC_WIRE_SCHEMA_V1
Schema identifier for the first identity-aware sync wire envelope.

Traits§

LeaderElection
Leader election contract.
ReplicationLog
Replication log contract.
SyncCheckpointStore
Sync checkpoint storage contract by peer id.
SyncOutbox
Ordered bounded queue that retains replication batches until acknowledgement.
SyncTransport
Sync transport contract.

Functions§

compute_events_hash
Computes the SHA-256 hash of events payload deterministically including size prefixes and batch metadata.
decode_sync_envelope
Decodes the identity-aware v1 JSON envelope.
decode_sync_message
Decodes a versioned v1 envelope and returns its replication message.
discover_dns_sync_peers
Resolves DNS peer seeds and returns normalized, de-duplicated addresses.
encode_sync_envelope_v1
Encodes an identity-aware v1 envelope as JSON.

Type Aliases§

SyncResult
Sync-local result type.