coven/sync/
push.rs

1//! Push-related types for the sync system.
2//!
3//! The actual push orchestration happens in `SyncService::sync()`, which
4//! returns an `OutgoingChangeset` for the caller to encrypt and upload.
5//! This module holds the shared types and the schema version constant.
6
7/// Current schema version -- a monotonically increasing tag attached to
8/// outgoing changesets. Receivers reject changesets whose schema_version
9/// is higher than they support, so this must be bumped any time the on-disk
10/// shape of synced tables changes.
11pub const SCHEMA_VERSION: u32 = 4;
12
13/// An outgoing changeset ready to be pushed to sync storage.
14pub struct OutgoingChangeset {
15    /// The packed envelope + changeset bytes (plaintext, ready for encryption).
16    pub packed: Vec<u8>,
17    /// The sequence number for this changeset.
18    pub seq: u64,
19}