Skip to main content

install_default_config

Function install_default_config 

Source
pub fn install_default_config(
    cfg: HttpConfig,
) -> Result<(), ConfigAlreadyInstalled>
Expand description

Install a process-wide HttpConfig that the default scheme openers (register, register_source, open_http) will use.

One-shot: returns ConfigAlreadyInstalled if either the config or the agent has already been built. Call this once during program start-up, before the first source-registry open. Per-call overrides remain available through HttpSource::open_with_config even after a default has been installed.