TCP/TLS connection pooling for Eio
at main 1.7 kB view raw
1(*--------------------------------------------------------------------------- 2 Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 SPDX-License-Identifier: ISC 4 ---------------------------------------------------------------------------*) 5 6(** Cmdliner terms for connection pool configuration *) 7 8(** {1 Configuration Terms} *) 9 10val max_connections_per_endpoint : int Cmdliner.Term.t 11(** Cmdliner term for maximum connections per endpoint. Default: 10 Flag: 12 [--max-connections-per-endpoint] *) 13 14val max_idle_time : float Cmdliner.Term.t 15(** Cmdliner term for maximum idle time in seconds. Default: 60.0 Flag: 16 [--max-idle-time] *) 17 18val max_connection_lifetime : float Cmdliner.Term.t 19(** Cmdliner term for maximum connection lifetime in seconds. Default: 300.0 20 Flag: [--max-connection-lifetime] *) 21 22val max_connection_uses : int option Cmdliner.Term.t 23(** Cmdliner term for maximum connection uses. Default: None (unlimited) Flag: 24 [--max-connection-uses] *) 25 26val connect_timeout : float Cmdliner.Term.t 27(** Cmdliner term for connection timeout in seconds. Default: 10.0 Flag: 28 [--connect-timeout] *) 29 30val connect_retry_count : int Cmdliner.Term.t 31(** Cmdliner term for number of connection retry attempts. Default: 3 Flag: 32 [--connect-retry-count] *) 33 34val connect_retry_delay : float Cmdliner.Term.t 35(** Cmdliner term for initial retry delay in seconds. Default: 0.1 Flag: 36 [--connect-retry-delay] *) 37 38(** {1 Combined Terms} *) 39 40val config : Config.t Cmdliner.Term.t 41(** Cmdliner term that combines all configuration options into a {!Config.t}. 42 This term can be used in your application's main command to accept all 43 connection pool configuration options from the command line. *)