Expand description
Configuration loading and schema types for the gateway’s two YAML files:
system.yaml (process-level settings: listener, timeouts, admin, logging)
and gateway.yaml (routes and node-graph policies). All values support
${ENV_VAR:-default} interpolation, resolved at different times by file:
system.yaml is text-interpolated at load by load_yaml_with_env;
gateway.yaml is loaded raw by load_yaml — placeholders stay in
the stored config (which the Admin API serves to the Web UI, so resolved
secrets never leak there) and are resolved at the point of consumption:
plugin node config at graph-compile time (interpolate_env_json), route
match rules when the route table is built, consumer credentials when the
consumer store is built.
Re-exports§
pub use loader::interpolate_env;pub use loader::interpolate_env_json;pub use loader::load_yaml;pub use loader::load_yaml_with_env;pub use gateway::EdgeConfig;pub use gateway::GatewayConfig;pub use gateway::MatchRule;pub use gateway::NodeConfig;pub use gateway::PluginConfigDef;pub use gateway::PolicyConfig;pub use gateway::Position;pub use gateway::RouteConfig;pub use gateway::StoreConfig;pub use gateway::StoreTlsConfig;pub use gateway::SupernodeConfig;pub use resolve::resolve_plugin_configs;pub use system::normalize_domain;pub use system::parse_duration;pub use system::AcmeConfig;pub use system::AcmeEabConfig;pub use system::AcmeSlot;pub use system::AcmeStorageConfig;pub use system::AdminConfig;pub use system::ConfigSourceKind;pub use system::DebugConfig;pub use system::EtcdConfig;pub use system::LoggingConfig;pub use system::McpConfig;pub use system::McpScope;pub use system::McpTokenConfig;pub use system::SniCert;pub use system::SniRoute;pub use system::StreamListenerConfig;pub use system::StreamProtocol;pub use system::StreamUpstreamConfig;pub use system::SystemConfig;pub use system::TimeoutConfig;pub use system::TlsConfig;pub use system::MCP_MIN_TOKEN_LEN;pub use warnings::collect_template_warnings;
Modules§
- gateway 🔒
- Schema for
gateway.yaml: routes (match rules bound to a policy) and node-graph policies (nodes plus success/error edges). This file is the hot-reloadable half of the configuration and is also mutated at runtime by the Admin API. - loader 🔒
- YAML loading and shell-style
${ENV_VAR:-default}interpolation. - resolve 🔒
- Compile-time resolution of shared plugin configs (
config_ref). - system 🔒
- Schema for
system.yaml: process-level settings (data-plane listener, TLS, HTTP/2, timeouts, logging, admin API). Loaded once at startup and never hot-reloaded; every top-level field has a serde default, so any section may be omitted. - warnings 🔒
- Load-time scan for unresolved
{{...}}template syntax.