mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-09 12:23:32 -04:00
10 lines
5.6 KiB
HTML
10 lines
5.6 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make (cohttp-lwt.Cohttp_lwt.Connection_cache.Make)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Connection_cache</a> » Make</nav><header class="odoc-preamble"><h1>Module <code><span>Connection_cache.Make</span></code></h1><p>This functor keeps a cache of connections for reuse. Connections are reused based on their remote <code>Conduit.endp</code> (effectively IP / port).</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav></div><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><div class="odoc-spec"><div class="spec parameter anchored" id="argument-1-Connection"><a href="#argument-1-Connection" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-Connection/index.html">Connection</a></span><span> : <a href="../../S/module-type-Connection/index.html">S.Connection</a></span></code></div></div><div class="odoc-spec"><div class="spec parameter anchored" id="argument-2-Sleep"><a href="#argument-2-Sleep" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-2-Sleep/index.html">Sleep</a></span><span> : <a href="../../S/module-type-Sleep/index.html">S.Sleep</a></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../S/module-type-Connection_cache/index.html">S.Connection_cache</a></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-call"><a href="#val-call" class="anchor"></a><code><span><span class="keyword">val</span> call : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="../../S/index.html#type-call">S.call</a></span></code></div><div class="spec-doc"><p>Process a request. Please see <code>call</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||
<span><span class="optlabel">?ctx</span>:<a href="argument-1-Connection/Net/index.html#type-ctx">Connection.Net.ctx</a> <span class="arrow">-></span></span>
|
||
<span><span class="optlabel">?keep</span>:int64 <span class="arrow">-></span></span>
|
||
<span><span class="optlabel">?retry</span>:int <span class="arrow">-></span></span>
|
||
<span><span class="optlabel">?parallel</span>:int <span class="arrow">-></span></span>
|
||
<span><span class="optlabel">?depth</span>:int <span class="arrow">-></span></span>
|
||
<span><span class="optlabel">?proxy</span>:<a href="../../../../uri/Uri/index.html#type-t">Uri.t</a> <span class="arrow">-></span></span>
|
||
<span>unit <span class="arrow">-></span></span>
|
||
<a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Create a new connection cache</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">ctx</span> <p>Conduit context to use. See <a href="argument-1-Connection/Net/index.html#type-ctx"><code>Connection.Net.ctx</code></a>.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">keep</span> <p>Number of nanoseconds to keep an idle connection around.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">retry</span> <p>Number of times a <em>gracefully</em> failed request is automatically retried. <em>graceful</em> means failed with <a href="argument-1-Connection/index.html#exception-Retry"><code>Connection.Retry</code></a>. Requests with a <code>`Stream</code> <a href="../../Body/index.html"><code>Body</code></a> cannot be retried automatically. Such requests will fail with <a href="argument-1-Connection/index.html#exception-Retry"><code>Connection.Retry</code></a> and a new <a href="../../Body/index.html"><code>Body</code></a> will need to be provided to retry.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">parallel</span> <p>maximum number of connections to establish to a single endpoint. Beware: A single hostname may resolve to multiple endpoints. In such a case connections may be created in excess to what was intended.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">depth</span> <p>maximum number of requests to queue and / or send on a single connection.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">proxy</span> <p>A direct (non-tunneling) proxy to use.</p></li></ul></div></div></div></body></html>
|