fedimint_server/
connection_limits.rs

1/// Configuration for connection and request limits
2#[derive(Debug, Clone, Copy)]
3pub struct ConnectionLimits {
4    /// Maximum number of concurrent connections
5    pub max_connections: usize,
6    /// Maximum number of parallel requests per connection
7    pub max_requests_per_connection: usize,
8}
9
10impl ConnectionLimits {
11    /// Create new connection limits
12    pub fn new(max_connections: usize, max_requests_per_connection: usize) -> Self {
13        Self {
14            max_connections,
15            max_requests_per_connection,
16        }
17    }
18}