nanoev/tiny_httpd/Tiny_httpd_prometheus/Registry/index.html
2025-05-05 14:16:16 +00:00

2 lines
2.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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> &#x00BB; <a href="../../index.html">tiny_httpd</a> &#x00BB; <a href="../index.html">Tiny_httpd_prometheus</a> &#x00BB; 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">&#45;&gt;</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">&#45;&gt;</span></span> <span><span>(<span>unit <span class="arrow">&#45;&gt;</span></span> unit)</span> <span class="arrow">&#45;&gt;</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">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</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">&#45;&gt;</span></span> string</span></code></div></div></div></body></html>