Expand description
Receiver-side Detritus server library.
The detritus-server package ships the detritusd binary for normal
operation. This library surface is for embedding the receiver in another
process, usually tests, local tooling, or custom orchestration.
use detritus_server::{RateLimitConfig, RetentionConfig, SchemaRegistry, ServerConfig};Structs§
- Project
Schema Entry - JSON Schema registry for per-tenant payload validation.
One
[[schema]]entry as parsed fromtokens.toml. - Rate
Limit Config - Rate-limit configuration for logs and crash uploads. Per-token rate limits for log and crash ingestion.
- Retention
Config - Retention configuration used by the background janitor. Retention policy for logs, crash indexes, and unreferenced crash blobs.
- Schema
Registry - JSON Schema registry for per-tenant payload validation.
Registry of per-tenant JSON Schema validators, keyed by
(project, kind). - Security
Config - Authentication and token configuration for embedded servers. Security configuration loaded from the token configuration file.
- Server
Config - Server configuration and serving entry points. Runtime configuration for an embedded Detritus server.
- Test
Token - Authentication and token configuration for embedded servers. Pre-hashed token entry used by embedded tests and local harnesses.
- Token
Store - Authentication and token configuration for embedded servers. In-memory bearer-token store used by the server.
Enums§
- Auth
Config Error - Authentication and token configuration for embedded servers. Errors returned while loading security configuration.
- Schema
Kind - JSON Schema registry for per-tenant payload validation. The two payload shapes that may carry a per-tenant JSON Schema.
Functions§
- load_
security_ config - Authentication and token configuration for embedded servers. Loads token and rate-limit configuration from a TOML file.
- serve
- Server configuration and serving entry points. Runs a Detritus server until the process receives Ctrl-C.
- serve_
with_ shutdown - Server configuration and serving entry points.
Runs a Detritus server on an existing listener until
shutdownresolves.