pub struct Config {
pub http_port: u16,
pub https_port: Option<u16>,
pub cert_path: Option<PathBuf>,
pub key_path: Option<PathBuf>,
pub control_port: u16,
pub control_auth: Option<String>,
pub server: HashMap<String, ServerConfig>,
}Expand description
Top-level configuration, deserialized directly from the TOML root.
Named server blocks are declared as [server.NAME] sections.
Global ports and TLS settings live at the root (no section header).
Example:
http_port = 3000
control_port = 17809
[server.frontend]
bind_to = "*"
proxy_url = "http://localhost:5173"
[server.api]
bind_to = "/api"
proxy_url = "http://localhost:8080"Fields§
§http_port: u16HTTP listen port (default: 3000).
https_port: Option<u16>Optional HTTPS listen port.
When set, cert_path and key_path are required.
cert_path: Option<PathBuf>Path to the TLS certificate file (PEM). Required when https_port is set.
key_path: Option<PathBuf>Path to the TLS private key file (PEM). Required when https_port is set.
control_port: u16Control-plane listen port (default: 17809).
control_auth: Option<String>Optional bearer token required to call /refresh-cache.
server: HashMap<String, ServerConfig>Named server entries, each mapping to a [server.NAME] TOML block.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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
Mutably borrows from an owned value. Read more