Skip to main content

reddb_server/
lib.rs

1#![allow(dead_code, unused_imports, unused_variables)]
2// Structural lints we accept for API design reasons:
3#![allow(
4    clippy::too_many_arguments,   // complex DB operations legitimately need many params
5    clippy::type_complexity,      // internal types with nested generics
6    clippy::result_large_err,     // tonic::Status is 176 bytes, can't box it
7    clippy::should_implement_trait, // from_str() returns Option, not Result — different semantics
8    clippy::new_without_default,  // some constructors have side effects
9    clippy::enum_variant_names,   // JoinPhase variants all end in Start by design
10    clippy::wrong_self_convention, // to_bytes on Copy types in our serialization
11    clippy::len_without_is_empty  // segment structs don't need is_empty
12)]
13
14pub mod ai;
15pub mod api;
16pub mod application;
17pub mod auth;
18pub mod backup_bootstrap;
19pub mod catalog;
20pub mod cli;
21pub mod config;
22pub mod crypto;
23pub mod ec;
24pub mod engine;
25pub mod geo;
26pub mod grpc;
27pub mod health;
28pub mod index;
29pub mod json;
30pub mod json_field;
31pub mod log;
32pub mod mcp;
33pub mod modules;
34pub mod physical;
35pub(crate) mod presentation;
36pub mod regress;
37pub mod replication;
38pub(crate) mod reserved_fields;
39pub mod rpc_stdio;
40pub mod runtime;
41pub mod serde_json;
42pub mod server;
43pub mod service_cli;
44mod service_router;
45pub mod sqlstate;
46pub mod storage;
47pub mod telemetry;
48pub mod utils;
49pub mod wire;
50
51/// Re-export of the shared `reddb-wire` crate.
52///
53/// `reddb-wire` is the transport-agnostic protocol vocabulary
54/// (connection-string parser today, RedWire frames in a follow-up
55/// slice). Exposed here so existing `use reddb::…` callers can
56/// reach the parser without a separate dependency.
57pub use reddb_wire as wire_proto;
58
59pub mod prelude {
60    pub use crate::api::{
61        Capability, CapabilitySet, CatalogService, CatalogSnapshot, CollectionStats, DataOps,
62        QueryPlanner, RedDBError, RedDBOptions, RedDBResult, SchemaManifest, StorageMode,
63        DEFAULT_EXPORT_RETENTION, DEFAULT_SNAPSHOT_RETENTION, REDDB_FORMAT_VERSION,
64        REDDB_PROTOCOL_VERSION,
65    };
66    pub use crate::application::{
67        AdminUseCases, CatalogUseCases, EntityUseCases, GraphUseCases, NativeUseCases,
68        QueryUseCases, RuntimeAdminPort, RuntimeCatalogPort, RuntimeEntityPort, RuntimeGraphPort,
69        RuntimeNativePort, RuntimeQueryPort, RuntimeSchemaPort, SchemaUseCases,
70    };
71    pub use crate::auth::store::AuthStore;
72    pub use crate::auth::{AuthConfig, AuthError, Role as AuthRole};
73    pub use crate::catalog::{
74        snapshot_store, CatalogModelSnapshot, CollectionDescriptor, CollectionModel, SchemaMode,
75    };
76    pub use crate::engine::{EngineInfo, EngineStats, RedDBEngine};
77    pub use crate::grpc::{GrpcServerOptions, GrpcTlsOptions, RedDBGrpcServer};
78    pub use crate::health::{HealthIssue, HealthProvider, HealthReport, HealthState};
79    pub use crate::index::{
80        IndexCatalog, IndexCatalogSnapshot, IndexConfig, IndexKind, IndexMetric, IndexRuntime,
81        IndexStats,
82    };
83    pub use crate::physical::{
84        ArtifactState, BlockReference, CompactionPolicy, ExportDescriptor, GridLayout,
85        ManifestEvent, ManifestEventKind, ManifestPointers, PhysicalAnalyticsJob,
86        PhysicalGraphProjection, PhysicalIndexState, PhysicalLayout, PhysicalMetadataFile,
87        SnapshotDescriptor, SuperblockHeader, WalPolicy, DEFAULT_MANIFEST_EVENT_HISTORY,
88        PHYSICAL_METADATA_PROTOCOL_VERSION,
89    };
90    pub use crate::runtime::{
91        ConnectionPoolConfig, RedDBRuntime, RuntimeConnection, RuntimeFilter, RuntimeFilterValue,
92        RuntimeGraphCentralityAlgorithm, RuntimeGraphCentralityResult, RuntimeGraphCentralityScore,
93        RuntimeGraphClusteringResult, RuntimeGraphCommunity, RuntimeGraphCommunityAlgorithm,
94        RuntimeGraphCommunityResult, RuntimeGraphComponent, RuntimeGraphComponentsMode,
95        RuntimeGraphComponentsResult, RuntimeGraphCyclesResult, RuntimeGraphDegreeScore,
96        RuntimeGraphDirection, RuntimeGraphEdge, RuntimeGraphHitsResult,
97        RuntimeGraphNeighborhoodResult, RuntimeGraphNode, RuntimeGraphPath,
98        RuntimeGraphPathAlgorithm, RuntimeGraphPathResult, RuntimeGraphPattern,
99        RuntimeGraphProjection, RuntimeGraphTopologicalSortResult, RuntimeGraphTraversalResult,
100        RuntimeGraphTraversalStrategy, RuntimeGraphVisit, RuntimeIvfMatch, RuntimeIvfSearchResult,
101        RuntimeQueryResult, RuntimeQueryWeights, RuntimeStats, ScanCursor, ScanPage,
102    };
103    pub use crate::server::{RedDBServer, ServerOptions, ServerReplicationState};
104}
105
106pub use crate::api::{
107    tier_wiring, Capability, CapabilitySet, CatalogService, CatalogSnapshot, CollectionStats,
108    DataOps, QueryPlanner, RedDBError, RedDBOptions, RedDBResult, SchemaManifest, StorageMode,
109    DEFAULT_EXPORT_RETENTION, DEFAULT_SNAPSHOT_RETENTION, REDDB_FORMAT_VERSION,
110    REDDB_PROTOCOL_VERSION,
111};
112pub use crate::application::{
113    AdminUseCases, CatalogUseCases, EntityUseCases, GraphUseCases, NativeUseCases, QueryUseCases,
114    RuntimeAdminPort, RuntimeCatalogPort, RuntimeEntityPort, RuntimeGraphPort, RuntimeNativePort,
115    RuntimeQueryPort, RuntimeSchemaPort, SchemaUseCases,
116};
117pub use crate::catalog::{
118    snapshot_store, CatalogModelSnapshot, CollectionDescriptor, CollectionModel, SchemaMode,
119};
120pub use crate::engine::{EngineInfo, EngineStats, RedDBEngine};
121pub use crate::grpc::{GrpcServerOptions, GrpcTlsOptions, RedDBGrpcServer};
122pub use crate::health::{HealthIssue, HealthProvider, HealthReport, HealthState};
123pub use crate::index::{
124    IndexCatalog, IndexCatalogSnapshot, IndexConfig, IndexKind, IndexMetric, IndexRuntime,
125    IndexStats,
126};
127pub use crate::physical::{
128    fold_dwb_into_wal_enabled, fold_pager_meta_enabled, meta_json_sidecar_enabled,
129    provision_shm, read_shm_header, seqn_journal_enabled, seqn_journal_retention,
130    set_fold_dwb_into_wal_enabled, set_fold_pager_meta_enabled,
131    set_meta_json_sidecar_enabled, set_seqn_journal_enabled,
132    set_seqn_journal_retention, set_shm_provisioning_enabled, shm_path_for,
133    shm_provisioning_enabled, ArtifactState, BlockReference, CompactionPolicy, ExportDescriptor,
134    GridLayout, ManifestEvent, ManifestEventKind, ManifestPointers, PhysicalAnalyticsJob,
135    PhysicalGraphProjection, PhysicalIndexState, PhysicalLayout, PhysicalMetadataFile,
136    ShmHandle, ShmHeader, ShmProvisionState, SnapshotDescriptor, SuperblockHeader, WalPolicy,
137    DEFAULT_MANIFEST_EVENT_HISTORY, DEFAULT_METADATA_JOURNAL_RETENTION,
138    OPT_IN_METADATA_JOURNAL_RETENTION, PHYSICAL_METADATA_PROTOCOL_VERSION, SHM_FILE_SIZE,
139    SHM_HEADER_SIZE, SHM_MAGIC, SHM_VERSION,
140};
141pub use crate::replication::{ReplicationConfig, ReplicationRole};
142pub use crate::runtime::{
143    ConnectionPoolConfig, RedDBRuntime, RuntimeConnection, RuntimeFilter, RuntimeFilterValue,
144    RuntimeGraphCentralityAlgorithm, RuntimeGraphCentralityResult, RuntimeGraphCentralityScore,
145    RuntimeGraphClusteringResult, RuntimeGraphCommunity, RuntimeGraphCommunityAlgorithm,
146    RuntimeGraphCommunityResult, RuntimeGraphComponent, RuntimeGraphComponentsMode,
147    RuntimeGraphComponentsResult, RuntimeGraphCyclesResult, RuntimeGraphDegreeScore,
148    RuntimeGraphDirection, RuntimeGraphEdge, RuntimeGraphHitsResult,
149    RuntimeGraphNeighborhoodResult, RuntimeGraphNode, RuntimeGraphPath, RuntimeGraphPathAlgorithm,
150    RuntimeGraphPathResult, RuntimeGraphPattern, RuntimeGraphProjection,
151    RuntimeGraphTopologicalSortResult, RuntimeGraphTraversalResult, RuntimeGraphTraversalStrategy,
152    RuntimeGraphVisit, RuntimeIvfMatch, RuntimeIvfSearchResult, RuntimeQueryResult,
153    RuntimeQueryWeights, RuntimeStats, ScanCursor, ScanPage,
154};
155pub use crate::server::{RedDBServer, ServerOptions, ServerReplicationState};
156
157pub use crate::storage::*;