spin_factor_outbound_http/runtime_config.rs
1#[cfg(feature = "spin-cli")]
2pub mod spin;
3
4/// Runtime configuration for outbound HTTP.
5#[derive(Debug)]
6pub struct RuntimeConfig {
7 /// If true, enable connection pooling and reuse.
8 pub connection_pooling_enabled: bool,
9 /// If set, limits the number of concurrent outbound connections.
10 pub max_concurrent_connections: Option<usize>,
11 /// If set, limits how long `acquire` will wait for a connection permit.
12 pub wait_timeout: Option<std::time::Duration>,
13}
14
15impl Default for RuntimeConfig {
16 fn default() -> Self {
17 Self {
18 connection_pooling_enabled: true,
19 max_concurrent_connections: None,
20 wait_timeout: None,
21 }
22 }
23}