pub mod api;
#[cfg(feature = "bench-internals")]
mod bench;
pub mod client;
#[cfg(feature = "crdt-yjs")]
pub mod crdt;
pub mod native_transport;
mod progress;
mod round;
pub use progress::{
ProgressObserver, ProgressPhase, ProgressState, ProgressSubscription, SyncProgress,
SyncProgressListener,
};
pub use round::{
AppliedSyncRound, CompletedSyncRound, PreparedSyncRound, RoundOperation, RoundReply,
};
pub mod previous_version;
pub mod query_guard;
pub mod realtime_round;
pub mod remote;
pub mod schema;
pub mod transport;
pub mod values;
#[cfg(any(test, all(target_arch = "wasm32", target_os = "unknown")))]
mod wasm_vfs;
#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
pub(crate) fn wall_clock_ms() -> i64 {
js_sys::Date::now() as i64
}
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
pub(crate) fn wall_clock_ms() -> i64 {
std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.expect("system clock predates Unix epoch")
.as_millis() as i64
}
pub use api::{
creation_time_bucket, last, AppliedServerCommit, AppliedServerCommitSource, AuthorityCoverage,
AuthorityCoverageState, AuthorityParam, AuthorityQuery, AuthorityQueryResult,
AuthorityReadResult, AuthorityResultColumn, ClientChangeBatch, ClientDiagnosticsHost,
ClientDiagnosticsLease, ClientDiagnosticsReplica, ClientDiagnosticsSchema,
ClientDiagnosticsSnapshot, ClientDiagnosticsStorage, ClientError, ClientLimits, CommandEffects,
CommitDelivery, CommitOperation, CommitOperationOutcome, CommitOutcome, CommitOutcomeQuery,
CommitOutcomeResolution, CommitOutcomeStatus, ConflictRecord, CoverageSnapshot,
CurrentBaseProof, CurrentBaseProofReason, DiagnosticLastChange, DiagnosticLastRound,
DiagnosticQueryFailure, DiagnosticRoundCounters, DiagnosticUnits, EchoRecord, FetchedBlob,
LocalDataPurgeInput, LocalDataPurgeResult, LocalDataPurgeTarget, LocalDataRebootstrapInput,
LocalDataRebootstrapResult, Mutation, PendingCommit, PresencePeer, QueryOwner,
QueryReadFailure, QueryRow, QuerySnapshot, QueryValue, RealtimePolicy, RealtimeState,
RejectionRecord, ResolveCommitOutcomeInput, RetainedCommitRow, RetainedUniqueConflict,
RowState, SchemaFloor, SnapshotRead, SyncIntent, SyncOutcome, SyncReport, SyncStatusSnapshot,
TableChange, TimeBucketUnit, TransportCauseKind, TransportGate, UnitCatchup, UnitRecord,
UnitRestriction, UnitScopes, UnitStatus, WindowBase, WindowChange, WindowCoverage, WindowState,
WindowUnitRef, CLIENT_DIAGNOSTICS_VERSION, LOCAL_AUTHORITY_UNCONFIGURED_CODE,
MAX_DIAGNOSTIC_QUERY_FAILURES, REALTIME_LOST_CODE, REALTIME_UNAVAILABLE_CODE,
};
pub use client::ProjectionInput;
pub use client::{
authority_read_set, validate_authority_reads, CurrentBasePreparation, FileQuerySnapshotReader,
PreparedFenceRound, SnapshotReadRequest, SnapshotStatement, SyncClient,
SECURITY_PREFLIGHT_REQUIRED_CODE,
};
pub use schema::{compile_schema, parse_schema_json, ClientSchema};
pub use transport::{
BlobDownload, BlobUploadGrant, SegmentFetch, SegmentRequest, Transport, TransportError,
};
pub use realtime_round::{RealtimeRound, RoundInbound, REALTIME_TAG_DELTA, REALTIME_TAG_ROUND};
pub use remote::{
PreparedRemoteCommit, RemoteBytes, RemoteClientError, RemoteCommandResult, RemoteCommitInput,
RemoteCommitResult, RemoteQueryResult, SyncRemoteClient,
};
pub use ssp2::{MessageStreamScanner, ScannedMessage};