ocaml-trace/trace-tef/Trace_tef/Exporter/index.html
2025-05-08 13:50:29 +00:00

2 lines
No EOL
3.6 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>Exporter (trace-tef.Trace_tef.Exporter)</title><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.2"/><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">trace-tef</a> &#x00BB; <a href="../index.html">Trace_tef</a> &#x00BB; Exporter</nav><header class="odoc-preamble"><h1>Module <code><span>Trace_tef.Exporter</span></code></h1><p>An exporter, takes JSON objects and writes them somewhere</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><span> = </span><span>{</span></code><ol><li id="type-t.on_json" class="def record field anchored"><a href="#type-t.on_json" class="anchor"></a><code><span>on_json : <span><a href="../../../ocaml/Stdlib/Buffer/index.html#type-t">Stdlib.Buffer.t</a> <span class="arrow">&#45;&gt;</span></span> unit;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>Takes a buffer and writes it somewhere. The buffer is only valid during this call and must not be stored.</p><span class="comment-delim">*)</span></div></li><li id="type-t.flush" class="def record field anchored"><a href="#type-t.flush" class="anchor"></a><code><span>flush : <span>unit <span class="arrow">&#45;&gt;</span></span> unit;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>Force write</p><span class="comment-delim">*)</span></div></li><li id="type-t.close" class="def record field anchored"><a href="#type-t.close" class="anchor"></a><code><span>close : <span>unit <span class="arrow">&#45;&gt;</span></span> unit;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>Close underlying resources</p><span class="comment-delim">*)</span></div></li></ol><code><span>}</span></code></div><div class="spec-doc"><p>An exporter, takes JSON objects and writes them somewhere.</p><p>This should be thread-safe if used in a threaded environment.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-of_out_channel"><a href="#val-of_out_channel" class="anchor"></a><code><span><span class="keyword">val</span> of_out_channel : <span>close_channel:bool <span class="arrow">&#45;&gt;</span></span> <span>jsonl:bool <span class="arrow">&#45;&gt;</span></span> <span><a href="../../../ocaml/Stdlib/index.html#type-out_channel">out_channel</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Export to the channel</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">jsonl</span> <p>if true, export as a JSON object per line, otherwise export as a single big JSON array.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">close_channel</span> <p>if true, closing the exporter will close the channel</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-of_buffer"><a href="#val-of_buffer" class="anchor"></a><code><span><span class="keyword">val</span> of_buffer : <span>jsonl:bool <span class="arrow">&#45;&gt;</span></span> <span><a href="../../../ocaml/Stdlib/Buffer/index.html#type-t">Stdlib.Buffer.t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div></div></div></body></html>