mirror of
https://github.com/c-cube/nanoev.git
synced 2025-12-06 19:25:39 -05:00
2 lines
2.8 KiB
HTML
2 lines
2.8 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Registry (tiny_httpd.Tiny_httpd_prometheus.Registry)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.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">tiny_httpd</a> » <a href="../index.html">Tiny_httpd_prometheus</a> » Registry</nav><header class="odoc-preamble"><h1>Module <code><span>Tiny_httpd_prometheus.Registry</span></code></h1><p>Registry for metrics.</p></header><div class="odoc-content"><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 class="spec-doc"><p>The registry contains a group of metrics</p></div></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>unit <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-on_will_emit"><a href="#val-on_will_emit" class="anchor"></a><code><span><span class="keyword">val</span> on_will_emit : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><span>(<span>unit <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><p><code>on_will_emit registry f</code> calls <code>f()</code> every time <code>emit buf registry</code> is called (before the metrics start being emitted). This is useful to update some metrics on demand.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-emit"><a href="#val-emit" class="anchor"></a><code><span><span class="keyword">val</span> emit : <span><a href="../../../ocaml/Stdlib/Buffer/index.html#type-t">Stdlib.Buffer.t</a> <span class="arrow">-></span></span> <span><a href="#type-t">t</a> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><p>Write metrics into the given buffer. The buffer will be cleared first thing.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-emit_str"><a href="#val-emit_str" class="anchor"></a><code><span><span class="keyword">val</span> emit_str : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> string</span></code></div></div></div></body></html>
|