pub struct ServerSettings {
pub listen_address: Option<String>,
pub port: Option<u16>,
pub cert: Option<String>,
pub key: Option<String>,
pub console_inactivity_timeout_secs: u64,
pub auth_rate_limit_per_minute: Option<u32>,
pub request_timeout_secs: u64,
}Expand description
Server-only settings — TLS, listen address, console behaviour. Lives
under [server] in server.toml.
Fields§
§listen_address: Option<String>TCP listen address (e.g. “0.0.0.0”). When omitted from config
and no --listen-address flag is supplied, the server falls
back to "0.0.0.0".
port: Option<u16>TCP port. When omitted from config and no --port flag is
supplied, the effective default depends on whether TLS is
configured: 8443 if both cert and key are present (HTTPS),
otherwise 8080 (plain HTTP). See
ServerSettings::default_port.
cert: Option<String>Path to the TLS certificate (PEM).
key: Option<String>Path to the TLS private key (PEM).
console_inactivity_timeout_secs: u64How long a node-console WebSocket stays open without activity before the server tears it down.
auth_rate_limit_per_minute: Option<u32>Per-source-IP rate limit for the /api/v1/auth/* endpoints,
in requests per minute. None disables in-process rate limiting
(operators are then expected to enforce it at the reverse proxy).
request_timeout_secs: u64Global request timeout applied to every HTTP route, in seconds.
When this elapses the server returns 408 REQUEST_TIMEOUT. All
long-running work (e.g. power transitions) now runs CLI-side,
so no endpoint needs more than the default.
Implementations§
Source§impl ServerSettings
impl ServerSettings
Sourcepub const DEFAULT_LISTEN_ADDRESS: &'static str = "0.0.0.0"
pub const DEFAULT_LISTEN_ADDRESS: &'static str = "0.0.0.0"
Effective default listen address when neither config nor CLI flag supplies one: bind on all interfaces.
Sourcepub fn default_port(has_tls: bool) -> u16
pub fn default_port(has_tls: bool) -> u16
Effective default port when neither config nor CLI flag supplies
one. 8443 for the HTTPS path (cert + key both present), 8080
for plain HTTP — the latter is the typical dev / sidecar setup
where TLS is terminated upstream.