+17
-1
.gitignore
+17
-1
.gitignore
+1
.ocamlformat
+1
.ocamlformat
···
···
+53
.tangled/workflows/build.yml
+53
.tangled/workflows/build.yml
···
···
+15
LICENSE.md
+15
LICENSE.md
···
···
+113
README.md
+113
README.md
···
···+Conpool is a connection pooling library built on Eio that manages TCP connection lifecycles, validates connection health, and provides per-endpoint resource limiting for any TCP-based protocol.
+8
-8
conpool.opam
+8
-8
conpool.opam
···"Conpool is a connection pooling library built on Eio.Pool that manages TCP connection lifecycles, validates connection health, and provides per-endpoint resource limiting for any TCP-based protocol (HTTP, Redis, PostgreSQL, etc.)"···
···"Conpool is a connection pooling library built on Eio.Pool that manages TCP connection lifecycles, validates connection health, and provides per-endpoint resource limiting for any TCP-based protocol (HTTP, Redis, PostgreSQL, etc.)"···
+11
-11
dune-project
+11
-11
dune-project
···(description "Conpool is a connection pooling library built on Eio.Pool that manages TCP connection lifecycles, validates connection health, and provides per-endpoint resource limiting for any TCP-based protocol (HTTP, Redis, PostgreSQL, etc.)")
···(description "Conpool is a connection pooling library built on Eio.Pool that manages TCP connection lifecycles, validates connection health, and provides per-endpoint resource limiting for any TCP-based protocol (HTTP, Redis, PostgreSQL, etc.)")
+30
-25
lib/cmd.ml
+30
-25
lib/cmd.ml
···
···
+20
-22
lib/cmd.mli
+20
-22
lib/cmd.mli
···
···
+46
-37
lib/config.ml
+46
-37
lib/config.ml
···············
···············
+25
-15
lib/config.mli
+25
-15
lib/config.mli
·········-@param connect_retry_delay Initial retry delay in seconds, with exponential backoff (default: 0.1)······-val health_check : t -> ([ `Close | `Flow | `R | `Shutdown | `W] Eio.Resource.t -> bool) option
···············
+16
-13
lib/connection.ml
+16
-13
lib/connection.ml
···-let src = Logs.Src.create "conpool.connection" ~doc:"Connection pool internal connection management"···
······
+318
-275
lib/conpool.ml
+318
-275
lib/conpool.ml
············-let addrs = Eio.Net.getaddrinfo_stream pool.net (Endpoint.host endpoint) ~service:(string_of_int (Endpoint.port endpoint)) in-let rec create_connection_with_retry (pool : ('clock, 'net) internal) endpoint attempt last_error =·········-raise (Pool_error (Connection_failed { endpoint; attempts = attempt; last_error = error_msg }))-raise (Pool_error (Connection_failed { endpoint; attempts = attempt; last_error = error_msg }))······-Log.debug (fun m -> m "Connection to %a failed validation, creating new one" Endpoint.pp endpoint);-let create ~sw ~(net : 'net Eio.Net.t) ~(clock : 'clock Eio.Time.clock) ?tls ?(config = Config.default) () : t =-Log.info (fun m -> m "Creating new connection pool (max_per_endpoint=%d, max_idle=%.1fs, max_lifetime=%.1fs)"······
·································
+41
-49
lib/conpool.mli
+41
-49
lib/conpool.mli
············
············
+14
-15
lib/endpoint.ml
+14
-15
lib/endpoint.ml
···
···
+7
-3
lib/endpoint.mli
+7
-3
lib/endpoint.mli
······
+6
-6
lib/stats.ml
+6
-6
lib/stats.ml
······
+5
lib/stats.mli
+5
lib/stats.mli
···
+9
-6
lib/tls_config.ml
+9
-6
lib/tls_config.ml
···
···
+9
-4
lib/tls_config.mli
+9
-4
lib/tls_config.mli
·········
·········