pub struct Env {Show 19 fields
pub data_dir: PathBuf,
pub config_dir: PathBuf,
pub log_level: String,
pub bind_ipv4: bool,
pub bind_ipv6: bool,
pub sec_max_header_bytes: u32,
pub sec_max_headers_count: u32,
pub sec_header_timeout_secs: u32,
pub sec_max_conn_per_ip: u32,
pub sec_max_total_conns: u32,
pub bind_max_attempts: u32,
pub bind_backoff_initial_ms: u32,
pub bind_backoff_max_ms: u32,
pub force_cancel_grace_secs: u32,
pub drain_timeout_secs: u32,
pub boot_health_timeout_secs: u32,
pub mgmt_unix: PathBuf,
pub mgmt_http_bind: Option<SocketAddr>,
pub mgmt_http_token: Option<String>,
}Expand description
Typed snapshot of every VANE_* deployment constant the daemon
reads at startup. Defaults match spec/architecture/09-config.md
§ Three-layer configuration.
Fields§
§data_dir: PathBufVANE_DATA_DIR — daemon working data root (default /var/lib/vaned).
config_dir: PathBufVANE_CONFIG_DIR — config-tree root (default /etc/vaned).
log_level: StringVANE_LOG_LEVEL — passed through to the tracing subscriber
verbatim (default "info").
bind_ipv4: boolVANE_BIND_IPV4 — listen on 0.0.0.0 for :N listen specs (default true).
bind_ipv6: boolVANE_BIND_IPV6 — listen on [::] for :N listen specs (default true).
sec_max_header_bytes: u32VANE_SEC_MAX_HEADER_BYTES — request-header size cap (default 65536).
sec_max_headers_count: u32VANE_SEC_MAX_HEADERS_COUNT — request-header count cap (default 100).
sec_header_timeout_secs: u32VANE_SEC_HEADER_TIMEOUT — header-completion timeout, seconds (default 30).
sec_max_conn_per_ip: u32VANE_SEC_MAX_CONN_PER_IP — per-IP concurrent-connection cap (default 100).
sec_max_total_conns: u32VANE_SEC_MAX_TOTAL_CONNS — daemon-wide concurrent-connection cap (default 65536).
bind_max_attempts: u32VANE_BIND_MAX_ATTEMPTS — bind-retry count per listener address (default 10).
bind_backoff_initial_ms: u32VANE_BIND_BACKOFF_INITIAL_MS — initial retry backoff in milliseconds (default 100).
bind_backoff_max_ms: u32VANE_BIND_BACKOFF_MAX_MS — retry backoff cap in milliseconds (default 5000).
force_cancel_grace_secs: u32VANE_FORCE_CANCEL_GRACE_SECS — secondary grace window after force_cancel fires,
seconds (default 5). Applies to both SIGTERM drain and removed-listener reconcile.
drain_timeout_secs: u32VANE_DRAIN_TIMEOUT_SECS — in-flight connection drain budget for reload and SIGTERM,
seconds (default 30).
boot_health_timeout_secs: u32VANE_BOOT_HEALTH_TIMEOUT_SECS — budget for all listeners to flip bind_ready,
seconds (default 60). Partial bind (some bound, some failed) stays a warn.
mgmt_unix: PathBufVANE_MGMT_UNIX — management Unix socket path (default /var/run/vaned.sock).
mgmt_http_bind: Option<SocketAddr>VANE_MGMT_HTTP_BIND — optional HTTP management endpoint (None
when unset or empty string; otherwise must parse as SocketAddr).
mgmt_http_token: Option<String>VANE_MGMT_HTTP_TOKEN — bearer token for mgmt_http_bind (None
when unset or empty string).
Implementations§
Source§impl Env
impl Env
Sourcepub fn from_process_env() -> Result<Self, Error>
pub fn from_process_env() -> Result<Self, Error>
Read from the actual process environment.
§Errors
Returns Error::compile when any VANE_* value fails its
type-specific parse (bool, u32, SocketAddr).