pub struct ServerConfig {
pub listen_address: SocketAddr,
pub health_listen_address: SocketAddr,
pub drain_timeout_ms: u64,
pub channels: Vec<ChannelDef>,
pub routing_rules: Vec<RoutingRuleDef>,
pub persistence_path: Option<PathBuf>,
pub cluster: Option<ClusterConfig>,
pub auth: Option<AuthConfig>,
pub services: ServicesConfig,
pub limits: LimitsConfig,
pub websocket: Option<WebSocketConfig>,
pub participant: Option<ParticipantConfig>,
}Expand description
Declarative configuration for the standalone liminal server wrapper.
Fields§
§listen_address: SocketAddrSocket address where the standalone server will listen for client traffic.
health_listen_address: SocketAddrSocket address where the health endpoint server will listen for probes.
drain_timeout_ms: u64IGNORED SINCE 0.14.3. Kept only so an existing config file still loads.
This was the maximum time shutdown would wait for existing connections to hang up by themselves before closing them. Nothing reads it now.
A drain exists to let in-flight requests finish. In this server every write is durable and flushed BEFORE it is acknowledged, so at the instant shutdown begins there is no in-flight request to finish and nothing for the wait to buy. What it did in practice, on a deployment whose connections are long-lived idle clients that never hang up on their own, was spend its whole budget on every restart and then close the connections anyway — 5 s per restart, measured on Tom Whiting’s estate on 2026-09-14. Shutdown now stops accepting, closes every connection itself (an orderly close each peer reads as a shutdown), and flushes durable state, with no timer in that path.
Any value parses, including zero. Setting it changes nothing.
channels: Vec<ChannelDef>Channel topology definitions declared by the operator.
routing_rules: Vec<RoutingRuleDef>Declarative routing rules that connect configured channels.
persistence_path: Option<PathBuf>Optional filesystem location for durable server state.
A fresh boot surfaces ConfigValidation unless this path’s PARENT
directory already exists: the haematite engine creates the store dir
exactly one level below a pre-existing parent it can fence (never
create_dir_all — deliberate upstream hardening). Create the parent;
the engine fences into it.
cluster: Option<ClusterConfig>Optional beamr distribution cluster membership configuration.
auth: Option<AuthConfig>Optional connection authentication configuration.
When present, every client Connect handshake must carry a matching
auth_token; when absent the server is open (byte-identical to the
pre-auth behaviour). Not an ACL system — a single shared bearer token.
services: ServicesConfigService construction profile. Absent [services] (or an absent profile
key within it) defaults to "full", so existing deployments build exactly
what they build today.
limits: LimitsConfigOperational bounds (§5). Absent [limits] (or any absent key within it)
defaults to the certifying-pair-signed numbers, so an operator who sets
nothing still runs bounded — “unlimited-by-silence is no longer a legal
state” (§5). Every value is a hard cap enforced by a typed refusal; a
zero (or otherwise invalid) value is a config validation error, never a
silent “unlimited”.
websocket: Option<WebSocketConfig>Optional WebSocket transport acceptor (LP-WS-TRANSPORT R1).
When present the server binds a sibling WebSocket listener carrying the canonical liminal wire protocol (one binary message per canonical frame) alongside the main TCP listener. When absent NO HTTP/WebSocket listener is started and the server behaves byte-identically to the pre-WebSocket build. Every field inside is a deployment decision; the origin allow-list FAILS CLOSED (an absent or empty list refuses every Origin-bearing upgrade) and the keepalive ping interval is disabled unless explicitly configured.
participant: Option<ParticipantConfig>Participant lifecycle activation (LP gap closure, Part B).
When present the server installs the production participant semantic handler and advertises the participant capability bit on every connection. Every field inside is REQUIRED and carries NO default: participant lifecycle values are deployment decisions, and an absent field is a typed startup error rather than an assumed number. When the section is absent the participant capability stays disabled and the server behaves byte-identically to the pre-activation build.
Implementations§
Source§impl ServerConfig
impl ServerConfig
Sourcepub const fn drain_timeout(&self) -> Duration
pub const fn drain_timeout(&self) -> Duration
Returns the configured drain timeout, which shutdown IGNORES since 0.14.3.
Retained so an embedder that reads it keeps compiling, and so the value
an operator wrote can still be named in the shutdown log line that
reports it ignored. See ServerConfig::drain_timeout_ms.
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more