detritus_server/lib.rs
1//! Receiver-side Detritus server library.
2//!
3//! The `detritus-server` package ships the `detritusd` binary for normal
4//! operation. This library surface is for embedding the receiver in another
5//! process, usually tests, local tooling, or custom orchestration.
6//!
7//! ```
8//! use detritus_server::{RateLimitConfig, RetentionConfig, SchemaRegistry, ServerConfig};
9//! ```
10
11mod auth;
12mod crashes;
13mod janitor;
14mod logs;
15mod metrics;
16mod rate_limit;
17mod schemas;
18mod server;
19mod storage;
20
21/// Authentication and token configuration for embedded servers.
22pub use auth::{AuthConfigError, SecurityConfig, TestToken, TokenStore, load_security_config};
23/// Retention configuration used by the background janitor.
24pub use janitor::RetentionConfig;
25/// Rate-limit configuration for logs and crash uploads.
26pub use rate_limit::RateLimitConfig;
27/// JSON Schema registry for per-tenant payload validation.
28pub use schemas::{ProjectSchemaEntry, SchemaKind, SchemaRegistry};
29/// Server configuration and serving entry points.
30pub use server::{ServerConfig, serve, serve_with_shutdown};
31
32#[doc(hidden)]
33/// Hidden test hook for exercising retention without exposing janitor internals.
34pub use janitor::{JanitorStats, run_janitor_cycle};
35#[doc(hidden)]
36/// Hidden test hook for storage-layout smoke tests.
37pub use storage::StoragePaths;