Skip to main content

Module config

Module config 

Source
Expand description

Protocol configuration (SPEC-002) — the declarative description of how one application uses the shared wire. Pure data: the codec never depends on it; thunder::client / thunder::server drive their behavior from it.

§Thunder ships one standard and zero product knowledge

There are no named configurations here — no synap(), no nexus(), no registry of products. Thunder was born from three products’ RPC implementations, but a protocol library that must serve implementations which do not exist yet cannot ship a hardcoded list of the ones that did.

Instead: Config::standard() is the family standard, and every dimension is a knob. An application that matches the standard writes its identity and nothing else:

use thunder::Config;

let config = Config::standard().scheme("myapp").port(9000);

An application that still diverges says so in its own repository, where that knowledge belongs:

use thunder::wire::config::{Handshake, HelloStyle, PushPolicy};
use thunder::Config;

// A deployment whose RPC path authenticates via AUTH and has no HELLO
// handler, and which ships a push-producing command.
let config = Config::standard()
    .scheme("legacy")
    .port(15501)
    .handshake(Handshake::AuthCommand)
    .hello_style(HelloStyle::NotUsed)
    .push(PushPolicy::Enabled);

Convergence is therefore visible and per-application: delete overrides until only scheme and port remain. Nobody waits on a Thunder release for a row in a registry, and Thunder never carries behavior it does not own.

The standard’s values are pinned to conformance/standard.yaml by a test in every language, so the four implementations can never disagree about what “standard” means — the one guarantee the old per-product registry legitimately provided.

Structs§

Config
One application’s protocol configuration (PRO-001).

Enums§

ErrorConvention
Which error-string prefix conventions the client parses (PRO-014).
Handshake
Handshake style (PRO-001).
HelloStyle
HELLO payload style (PRO-001).
PushPolicy
Server-push policy (PRO-001).
TlsPolicy
Transport-security policy (PRO-001).