//! SPSC event payload pushed by leader's write_slot / delete_slot
//! and consumed by the replication server.

/// Event carried over per-shard rtrb SPSC from leader write path to
/// replication server thread. Producer is `FixedShardInner.replication_tx`.
pub enum FixedReplicationEvent {
    /// OCCUPIED write. `payload` is the full serialized slot (slot_size
    /// bytes: meta + crc + key + value) — same Vec that was pwrite'd.
    Write { slot_id: u32, payload: Vec<u8> },
    /// DELETED mark. Key is carried separately so the follower can
    /// update its index without a pread on its own slot.
    Delete {
        slot_id: u32,
        meta: u32,
        key: Vec<u8>,
    },
}
