Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/IPC/Enhanced/ConnectionPool/
PoolConfig.rs

1//! Connection-pool tunables: max / min connection counts plus
2//! the four millisecond budgets (acquire timeout, max
3//! lifetime, idle timeout, health-check interval).
4
5use serde::{Deserialize, Serialize};
6
7#[derive(Debug, Clone, Serialize, Deserialize)]
8pub struct Struct {
9	pub max_connections:usize,
10
11	pub min_connections:usize,
12
13	pub connection_timeout_ms:u64,
14
15	pub max_lifetime_ms:u64,
16
17	pub idle_timeout_ms:u64,
18
19	pub health_check_interval_ms:u64,
20}
21
22impl Default for Struct {
23	fn default() -> Self {
24		Self {
25			max_connections:10,
26
27			min_connections:2,
28
29			connection_timeout_ms:30000,
30
31			max_lifetime_ms:300000,
32
33			idle_timeout_ms:60000,
34
35			health_check_interval_ms:30000,
36		}
37	}
38}