linkrs-sync 0.1.0

Synchronization primitives for Linkrs
Documentation
//! Synchronization coordination for derived secondary indexes.
//!
//! Engine implementations live outside this crate: fulltext search in
//! `linkrs-fulltext` and vector search in `simvec` plus `vector-client`.
//! This crate owns only coordination: durable outbox staging, delivery,
//! retry and rebuild orchestration, with thin per-engine coordinators on top.
//! `vector_type_conv` is the single conversion point between transport-side
//! filter types and index-side filter types.

#[cfg(feature = "vector")]
pub mod backend;
pub mod batch;
pub mod builder;
pub mod checkpoint_manifest;
pub mod circuit_breaker;
#[cfg(feature = "fulltext")]
pub mod coordinator;
pub mod dead_letter_queue;
pub mod manager;
mod outbox;
pub mod outbox_recovery;
#[cfg(feature = "fulltext")]
pub mod rebuild;
#[cfg(any(feature = "fulltext", feature = "vector"))]
pub mod rebuild_common;
pub mod receiver;
pub mod retry;
pub mod runtime;
pub mod sqlite_outbox;
pub mod types;
pub mod vector_error;
#[cfg(feature = "vector")]
pub mod vector_index_manager;
#[cfg(feature = "vector")]
pub mod vector_rebuild;
#[cfg(feature = "vector")]
pub mod vector_sync;
#[cfg(feature = "vector")]
pub mod vector_type_conv;

#[cfg(feature = "vector")]
pub use backend::BackendDeliveryPolicy;
#[cfg(feature = "fulltext")]
pub use batch::FulltextBatchProcessor;
pub use batch::{BatchConfig, BatchError, BatchProcessor, TransactionBatchBuffer};
pub use checkpoint_manifest::{
    CheckpointManifest, CheckpointManifestManager, IndexManifestRef, OutboxSnapshotRef,
    StorageFileRef, StorageSnapshotRef,
};
pub use circuit_breaker::{
    with_circuit_breaker, CircuitBreaker, CircuitBreakerConfig, CircuitBreakerError,
    CircuitBreakerStats, CircuitState,
};
#[cfg(feature = "fulltext")]
pub use coordinator::{
    ChangeContext, ChangeData, RecoveryResult, SyncCoordinator, SyncCoordinatorError,
};
pub use dead_letter_queue::{DeadLetterEntry, DeadLetterQueue, DeadLetterQueueConfig};
pub use linkrs_config::SyncConfig;
pub use manager::{
    EdgeProps, EdgeRef, OutboxBackpressureConfig, OutboxConsumerConfig, SyncError, SyncManager,
};
pub use outbox::{OutboxPayload, OutboxStats};
pub use outbox_recovery::{
    find_latest_snapshot, find_latest_snapshot_at_or_before, live_database_exists, recover_outbox,
    restore_latest_snapshot, restore_snapshot_sync, verify_live_database,
};
#[cfg(feature = "fulltext")]
pub use rebuild::{
    fulltext_edge_doc_basis, fulltext_field_index_id, fulltext_tag_index_id,
    fulltext_vertex_doc_id, FulltextRebuildOptions, RebuildDoc, RebuildDocSource, RebuildEntity,
};
#[cfg(feature = "fulltext")]
pub use receiver::FulltextReceiver;
#[cfg(feature = "vector")]
pub use receiver::VectorReceiver;
pub use receiver::{ApplyReceipt, LateArrivalResult};
pub use retry::{with_retry, RetryConfig};
pub use sqlite_outbox::{
    ClaimedEvent, DeadLetterRow, DegradedRangeRow, IndexSyncDiagnostics, OutboxSnapshot,
    RebuildEvent, SqliteOutbox, SyncDiagnostics, TargetSyncDiagnostics,
};
pub use types::{ChangeType, IndexData, IndexOpKey, IndexOperation, IndexType};
pub use vector_error::{VectorCoordinatorError, VectorError, VectorErrorKind};

#[cfg(feature = "vector")]
pub use vector_index_manager::{PublishOutcome, TempCollection, TempKey, VectorIndexManager};
#[cfg(feature = "vector")]
pub use vector_rebuild::{
    vector_tag_index_id, VectorDocSource, VectorRebuildDoc, VectorRebuildOptions,
};
#[cfg(feature = "vector")]
pub use vector_sync::{
    VectorChangeContext, VectorChangeType, VectorEngineState, VectorIndexLocation, VectorPointData,
    VectorSyncCoordinator,
};

#[cfg(feature = "vector")]
pub use backend::VectorBackend;
#[cfg(any(feature = "fulltext", feature = "vector"))]
pub use rebuild_common::RebuildCommonOptions;
#[cfg(feature = "vector")]
pub use simvec::HealthStatus;

// Re-export the remote client surface so downstream crates (root integration
// tests, embedded API) can reference it without a direct vector-client
// dependency. Only available with the qdrant feature.
#[cfg(feature = "vector-qdrant")]
pub use vector_client::{VectorClientConfig, VectorManager};