pub struct ServerConfig {
pub host: String,
pub port: u16,
pub channel: String,
pub auth_token: String,
pub log_level: String,
pub log_format: String,
pub log_file: Option<String>,
pub database_url: Option<String>,
pub config_path: Option<String>,
pub strict_type_driven_transport: bool,
pub default_backend: Option<String>,
pub schemas_dir: Option<String>,
}Expand description
Server configuration — mirrors CLI args for axon serve.
Fields§
§host: String§port: u16§channel: String§auth_token: String§log_level: String§log_format: StringLog output format: “json” or “pretty”.
log_file: Option<String>Optional directory for daily-rotated log files.
database_url: Option<String>PostgreSQL connection URL (for persistent storage).
config_path: Option<String>Optional path for persisted config file.
strict_type_driven_transport: bool§Fase 31.d (D6) — Type-Driven Wire Inference activation flag.
When true, POST /v1/execute promotes to SSE for any flow
the type-checker inferred as stream-producing (i.e. the
AxonEndpoint AST node carries implicit_transport == "sse")
REGARDLESS of the Accept: header. The D1 inference becomes
the wire’s authoritative source.
When false (D6 default in v1.22.x — backwards-compat first),
the Fase 30.e D4 + D5 negotiation matrix is preserved verbatim.
Only the additive 31.e diagnostic header is observable for
existing clients.
D9 ratified — this flag flips to default true in v2.0.0
(Fase 35+ candidate) with the full migration guide already
published in docs/MIGRATION_v1.22.md (31.h).
Adopters opt in via three converging surfaces (31.f):
- CLI:
axon serve --strict-type-driven-transport - Config file:
[server] strict_type_driven_transport = true - Env var:
AXON_STRICT_TYPE_DRIVEN_TRANSPORT=1
default_backend: Option<String>§Fase 36.g (D7) — Server-wide default execution backend.
Rung 3 of the Fase 36 Backend Resolution Contract ladder: when
a request behind an axonendpoint names no backend (rung 1)
and the route declares none (rung 2), this server default is
consulted before the environment-available auto rungs.
None ≡ no server default — resolution falls straight through
to the auto rungs (operator-tuned registry scores → the
providers with an API key in the environment). A Some("auto")
value is transparent — it behaves as None at the ladder. Lets
an operator pin a fleet-wide default without editing a single
.axon.
Adopters set it via three converging surfaces (D7 — mirrors the
strict_type_driven_transport precedence):
- CLI:
axon serve --backend <name> - Env var:
AXON_DEFAULT_BACKEND=<name> - Programmatic: this field.
The CLI flag wins when both CLI and env are set. The value is
validated against the closed catalog
(
parser::AXONENDPOINT_BACKEND_VALUES) atrun_servestartup — an unknown name fails fast, before the first request is served.
schemas_dir: Option<String>§Fase 38.j (D3 + D7 + D8) — Directory containing declared store-
schema manifests (*.axon-schema.json files at the project root
and/or under a schemas/ subdirectory).
When Some(path), POST /v1/deploy loads and merges every
manifest under the directory before running the deploy-time
store verification pass. The declared columns of every Fase 38
schema: form (a/b/c) are then proven AGAINST the live Postgres
introspection — any drift fails the deploy with structured
axon-T807 (DeclaredVsLiveDrift) diagnostics. axon-T805 (manifest
hash mismatch) and axon-T806 (missing per-tenant env var) also
surface here.
None ≡ no manifest loading — the v1.37.0 verify behavior is
preserved verbatim (D5 absolute backwards-compat). An adopter
who never adopts Fase 38’s compile-time schema observes ZERO
behavior change at deploy.
Adopters set it via three converging surfaces (D7 — mirrors the
default_backend precedence):
- CLI:
axon serve --schemas-dir <path> - Env var:
AXON_SCHEMAS_DIR=<path> - Programmatic: this field.
The CLI flag wins when both CLI and env are set. An empty value
collapses to
None. The directory’s existence is NOT verified at startup — a missing dir resolves to “no manifest files” the same way an empty dir does (load_and_merge_manifestsis total).
Implementations§
Source§impl ServerConfig
impl ServerConfig
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 moreSource§impl Debug for ServerConfig
impl Debug for ServerConfig
Source§impl Default for ServerConfig
§Fase 50.d/2 (v2.4.0) — minimal ServerConfig for embedded
callers (notably axon-enterprise’s runtime executor that
constructs ServerState to drive server_execute_streaming).
impl Default for ServerConfig
§Fase 50.d/2 (v2.4.0) — minimal ServerConfig for embedded
callers (notably axon-enterprise’s runtime executor that
constructs ServerState to drive server_execute_streaming).
Defaults: in-memory channel (no DB), no auth token, INFO logs to
stdout, no persisted state path. Adopters that need persistence
or auth construct ServerConfig explicitly. This default is
total + side-effect-free: ServerState::new(ServerConfig::default())
produces a fresh in-memory state with no on-disk recovery
attempted (when config_path is None).
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl UnwindSafe for ServerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more