pub struct Env {Show 19 fields
pub wasm_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_port: Option<u16>,
pub mgmt_http_public: bool,
pub mgmt_http_token: Option<String>,
}Expand description
Typed snapshot of every VANE_* deployment constant the daemon
reads at startup. Defaults match spec/crates/core.md
§ Config layers.
config_dir is not modeled as a field — the daemon’s --config
CLI arg is the single source of truth, and Env::from_reader
takes that path explicitly so derived defaults (wasm_dir) follow
it without an extra env var to keep in sync.
Fields§
§wasm_dir: PathBufVANE_WASM_DIR — WASM plugin source directory scanned at boot.
Defaults to <config_dir>/wasm where config_dir is the
daemon’s --config argument. See
spec/crates/engine-wasm.md § Module lifecycle.
log_level: StringVANE_LOG_LEVEL — tracing-subscriber filter directive
(default "info"). Honors the same syntax as RUST_LOG
(per-target overrides like vane=debug,hyper=warn). The
process env RUST_LOG, when set, takes precedence so
operators can override the file value ad-hoc.
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 /tmp/vaned.sock).
mgmt_http_port: Option<u16>VANE_MGMT_HTTP_PORT — TCP port for the HTTP management transport.
Some(3333) by default; an explicit empty string disables the
transport (None). Matches spec/crates/core.md
§ Config layers.
mgmt_http_public: boolVANE_MGMT_HTTP_PUBLIC — when truthy, bind the HTTP management
port on the wildcard address (0.0.0.0 / [::]). When falsy
(default), bind on loopback. Mandatory pairing with
mgmt_http_token is enforced at daemon boot, not here.
mgmt_http_token: Option<String>VANE_MGMT_HTTP_TOKEN — bearer token for the HTTP management
transport (None when unset or empty string).
Implementations§
Source§impl Env
impl Env
Sourcepub fn from_process_env(config_dir: &Path) -> Result<Self, Error>
pub fn from_process_env(config_dir: &Path) -> Result<Self, Error>
Read from the actual process environment.
config_dir is the daemon’s resolved --config path; it is
the basis for wasm_dir’s default when VANE_WASM_DIR is unset.
§Errors
Returns Error::compile when any VANE_* value fails its
type-specific parse (bool, u32, port).
Trait Implementations§
impl Eq for Env
impl StructuralPartialEq for Env
Auto Trait Implementations§
impl Freeze for Env
impl RefUnwindSafe for Env
impl Send for Env
impl Sync for Env
impl Unpin for Env
impl UnsafeUnpin for Env
impl UnwindSafe for Env
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more