Skip to main content

init_global_http_client

Function init_global_http_client 

Source
pub fn init_global_http_client(config: &PerformanceConfig) -> Result<()>
Expand description

Initialize the global HTTP client singleton

§Arguments

  • config - Performance configuration for connection pool settings

§Errors

Returns an error if HTTP client creation fails

§Note

This function is thread-safe and ensures only one thread performs the expensive client initialization (including TLS setup). Subsequent calls will return Ok(()) if initialization succeeded, or the original error if initialization previously failed.