Skip to main content

Crate detritus_server

Crate detritus_server 

Source
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§

ProjectSchemaEntry
JSON Schema registry for per-tenant payload validation. One [[schema]] entry as parsed from tokens.toml.
RateLimitConfig
Rate-limit configuration for logs and crash uploads. Per-token rate limits for log and crash ingestion.
RetentionConfig
Retention configuration used by the background janitor. Retention policy for logs, crash indexes, and unreferenced crash blobs.
SchemaRegistry
JSON Schema registry for per-tenant payload validation. Registry of per-tenant JSON Schema validators, keyed by (project, kind).
SecurityConfig
Authentication and token configuration for embedded servers. Security configuration loaded from the token configuration file.
ServerConfig
Server configuration and serving entry points. Runtime configuration for an embedded Detritus server.
TestToken
Authentication and token configuration for embedded servers. Pre-hashed token entry used by embedded tests and local harnesses.
TokenStore
Authentication and token configuration for embedded servers. In-memory bearer-token store used by the server.

Enums§

AuthConfigError
Authentication and token configuration for embedded servers. Errors returned while loading security configuration.
SchemaKind
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 shutdown resolves.